Import GNU Classpath (classpath-0_97_2-release).

libjava/

2008-06-28  Matthias Klose  <doko@ubuntu.com>

        Import GNU Classpath (classpath-0_97_2-release).

        * Regenerate class and header files.
        * Regenerate auto* files.
        * gcj/javaprims.h: Define jobjectRefType.
        * jni.cc (_Jv_JNI_GetObjectRefType): New (stub only).
        (_Jv_JNIFunctions): Initialize GetObjectRefType.
        * gnu/classpath/jdwp/VMVirtualMachine.java,
        java/security/VMSecureRandom.java: Merge from classpath.
        * HACKING: Fix typo.
        * ChangeLog-2007: New file.
        * configure.ac: Set JAVAC, pass --disable-regen-headers to classpath.

libjava/classpath/

2008-06-28  Matthias Klose  <doko@ubuntu.com>

        * m4/ac_prog_javac.m4: Disable check for JAVAC, when
        not configured with --enable-java-maintainer-mode.
        * aclocal.m4, configure: Regenerate.
        * native/jni/gstreamer-peer/Makefile.am: Do not link with
        libclasspathnative.
        * native/jni/gstreamer-peer/Makefile.in: Regenerate.
        * tools/Makefile.am, lib/Makefile.am: Use JAVAC for setting
        JCOMPILER, drop flags not understood by gcj.

From-SVN: r137223
This commit is contained in:
Matthias Klose 2008-06-28 13:29:13 +00:00
parent 15c151967d
commit e0441a5bfb
1429 changed files with 32837 additions and 18119 deletions

File diff suppressed because it is too large Load Diff

2658
libjava/ChangeLog-2007 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -167,11 +167,11 @@ libgcj_tools_la_OBJECTS = $(am_libgcj_tools_la_OBJECTS)
@INTERPRETER_TRUE@ gnu/classpath/jdwp/util.lo \
@INTERPRETER_TRUE@ gnu/classpath/jdwp/value.lo gnu/gcj/jvmti.lo
am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
gnu/classpath/debug.lo gnu/gcj.lo gnu/gcj/convert.lo \
gnu/gcj/io.lo gnu/gcj/runtime.lo gnu/gcj/util.lo \
gnu/java/awt.lo gnu/java/awt/color.lo gnu/java/awt/dnd.lo \
gnu/java/awt/font.lo gnu/java/awt/font/autofit.lo \
gnu/java/awt/font/opentype.lo \
gnu/classpath/debug.lo gnu/classpath/toolkit.lo gnu/gcj.lo \
gnu/gcj/convert.lo gnu/gcj/io.lo gnu/gcj/runtime.lo \
gnu/gcj/util.lo gnu/java/awt.lo gnu/java/awt/color.lo \
gnu/java/awt/dnd.lo gnu/java/awt/font.lo \
gnu/java/awt/font/autofit.lo gnu/java/awt/font/opentype.lo \
gnu/java/awt/font/opentype/truetype.lo gnu/java/awt/image.lo \
gnu/java/awt/java2d.lo gnu/java/awt/peer.lo \
gnu/java/awt/peer/headless.lo gnu/java/awt/print.lo \
@ -259,7 +259,8 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
javax/accessibility.lo javax/activity.lo javax/crypto.lo \
javax/crypto/interfaces.lo javax/crypto/spec.lo \
javax/management.lo javax/management/loading.lo \
javax/management/openmbean.lo javax/naming.lo \
javax/management/openmbean.lo javax/management/remote.lo \
javax/management/remote/rmi.lo javax/naming.lo \
javax/naming/directory.lo javax/naming/event.lo \
javax/naming/ldap.lo javax/naming/spi.lo javax/net.lo \
javax/net/ssl.lo javax/print.lo javax/print/attribute.lo \
@ -278,7 +279,7 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.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/undo.lo javax/tools.lo javax/transaction.lo \
javax/transaction/xa.lo org/ietf/jgss.lo sun/awt.lo \
sun/misc.lo sun/reflect.lo sun/reflect/annotation.lo \
sun/reflect/misc.lo $(am__DEPENDENCIES_1)
@ -1352,6 +1353,10 @@ classpath/gnu/classpath/jdwp/value/ValueFactory.java \
classpath/gnu/classpath/jdwp/value/VoidValue.java
gnu_classpath_jdwp_value_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_value_source_files)))
gnu_classpath_toolkit_source_files = \
classpath/gnu/classpath/toolkit/DefaultDaemonThreadFactory.java
gnu_classpath_toolkit_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_toolkit_source_files)))
gnu_gcj_source_files = \
gnu/gcj/Core.java \
gnu/gcj/RawData.java \
@ -1488,7 +1493,8 @@ classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java
gnu_java_awt_font_source_files = \
classpath/gnu/java/awt/font/FontDelegate.java \
classpath/gnu/java/awt/font/FontFactory.java \
classpath/gnu/java/awt/font/GNUGlyphVector.java
classpath/gnu/java/awt/font/GNUGlyphVector.java \
classpath/gnu/java/awt/font/OpenTypeFontPeer.java
gnu_java_awt_font_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_awt_font_source_files)))
gnu_java_awt_font_autofit_source_files = \
@ -1533,6 +1539,8 @@ classpath/gnu/java/awt/font/opentype/truetype/ZonePathIterator.java
gnu_java_awt_font_opentype_truetype_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_awt_font_opentype_truetype_source_files)))
gnu_java_awt_image_source_files = \
classpath/gnu/java/awt/image/AsyncImage.java \
classpath/gnu/java/awt/image/ImageConverter.java \
classpath/gnu/java/awt/image/ImageDecoder.java \
classpath/gnu/java/awt/image/XBMDecoder.java
@ -1544,6 +1552,7 @@ classpath/gnu/java/awt/java2d/AlphaCompositeContext.java \
classpath/gnu/java/awt/java2d/CubicSegment.java \
classpath/gnu/java/awt/java2d/ImagePaint.java \
classpath/gnu/java/awt/java2d/LineSegment.java \
classpath/gnu/java/awt/java2d/PixelCoverage.java \
classpath/gnu/java/awt/java2d/Pixelizer.java \
classpath/gnu/java/awt/java2d/PolyEdge.java \
classpath/gnu/java/awt/java2d/PolyEdgeComparator.java \
@ -1554,6 +1563,8 @@ classpath/gnu/java/awt/java2d/ScanlineConverter.java \
classpath/gnu/java/awt/java2d/ScanlineCoverage.java \
classpath/gnu/java/awt/java2d/Segment.java \
classpath/gnu/java/awt/java2d/ShapeCache.java \
classpath/gnu/java/awt/java2d/ShapeWrapper.java \
classpath/gnu/java/awt/java2d/TextCacheKey.java \
classpath/gnu/java/awt/java2d/TexturePaintContext.java
gnu_java_awt_java2d_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_awt_java2d_source_files)))
@ -1690,12 +1701,11 @@ classpath/gnu/java/awt/peer/swing/SwingWindowPeer.java
gnu_java_awt_peer_x_source_files = \
classpath/gnu/java/awt/peer/x/GLGraphics.java \
classpath/gnu/java/awt/peer/x/ImageConverter.java \
classpath/gnu/java/awt/peer/x/KeyboardMapping.java \
classpath/gnu/java/awt/peer/x/PixmapVolatileImage.java \
classpath/gnu/java/awt/peer/x/XDialogPeer.java \
classpath/gnu/java/awt/peer/x/XEventPump.java \
classpath/gnu/java/awt/peer/x/XFontPeer2.java \
classpath/gnu/java/awt/peer/x/XFontPeer.java \
classpath/gnu/java/awt/peer/x/XFramePeer.java \
classpath/gnu/java/awt/peer/x/XGraphics2D.java \
classpath/gnu/java/awt/peer/x/XGraphicsConfiguration.java \
@ -1991,6 +2001,8 @@ gnu/java/nio/channels/FileChannelImpl.java
gnu_java_nio_channels_header_files = $(patsubst %.java,%.h,$(gnu_java_nio_channels_source_files))
gnu_java_nio_charset_source_files = \
classpath/gnu/java/nio/charset/ByteCharset.java \
classpath/gnu/java/nio/charset/ByteDecodeLoopHelper.java \
classpath/gnu/java/nio/charset/ByteEncodeLoopHelper.java \
classpath/gnu/java/nio/charset/Cp424.java \
classpath/gnu/java/nio/charset/Cp437.java \
classpath/gnu/java/nio/charset/Cp737.java \
@ -2347,6 +2359,7 @@ gnu_java_util_source_files = \
classpath/gnu/java/util/Base64.java \
classpath/gnu/java/util/DoubleEnumeration.java \
classpath/gnu/java/util/EmptyEnumeration.java \
classpath/gnu/java/util/LRUCache.java \
classpath/gnu/java/util/WeakIdentityHashMap.java \
classpath/gnu/java/util/ZoneInfo.java
@ -5296,6 +5309,16 @@ classpath/javax/management/openmbean/TabularDataSupport.java \
classpath/javax/management/openmbean/TabularType.java
javax_management_openmbean_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_management_openmbean_source_files)))
javax_management_remote_source_files = \
classpath/javax/management/remote/NotificationResult.java \
classpath/javax/management/remote/TargetedNotification.java
javax_management_remote_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_management_remote_source_files)))
javax_management_remote_rmi_source_files = \
classpath/javax/management/remote/rmi/RMIConnection.java \
classpath/javax/management/remote/rmi/RMIServer.java
javax_management_remote_rmi_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_management_remote_rmi_source_files)))
javax_naming_source_files = \
classpath/javax/naming/AuthenticationException.java \
classpath/javax/naming/AuthenticationNotSupportedException.java \
@ -6328,6 +6351,12 @@ classpath/javax/swing/undo/UndoableEdit.java \
classpath/javax/swing/undo/UndoableEditSupport.java
javax_swing_undo_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_swing_undo_source_files)))
javax_tools_source_files = \
classpath/javax/tools/Diagnostic.java \
classpath/javax/tools/DiagnosticListener.java \
classpath/javax/tools/FileObject.java
javax_tools_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_tools_source_files)))
javax_transaction_source_files = \
classpath/javax/transaction/HeuristicCommitException.java \
classpath/javax/transaction/HeuristicMixedException.java \
@ -7260,6 +7289,7 @@ all_packages_source_files = \
gnu/awt/j2d.list \
gnu/classpath.list \
gnu/classpath/debug.list \
gnu/classpath/toolkit.list \
gnu/gcj.list \
gnu/gcj/convert.list \
gnu/gcj/io.list \
@ -7450,6 +7480,8 @@ all_packages_source_files = \
javax/management.list \
javax/management/loading.list \
javax/management/openmbean.list \
javax/management/remote.list \
javax/management/remote/rmi.list \
javax/naming.list \
javax/naming/directory.list \
javax/naming/event.list \
@ -7491,6 +7523,7 @@ all_packages_source_files = \
javax/swing/text/rtf.list \
javax/swing/tree.list \
javax/swing/undo.list \
javax/tools.list \
javax/transaction.list \
javax/transaction/xa.list \
org/ietf/jgss.list \
@ -7506,6 +7539,7 @@ ordinary_header_files = \
$(gnu_awt_j2d_header_files) \
$(gnu_classpath_header_files) \
$(gnu_classpath_debug_header_files) \
$(gnu_classpath_toolkit_header_files) \
$(gnu_gcj_header_files) \
$(gnu_gcj_convert_header_files) \
$(gnu_gcj_io_header_files) \
@ -7693,6 +7727,8 @@ ordinary_header_files = \
$(javax_management_header_files) \
$(javax_management_loading_header_files) \
$(javax_management_openmbean_header_files) \
$(javax_management_remote_header_files) \
$(javax_management_remote_rmi_header_files) \
$(javax_naming_header_files) \
$(javax_naming_directory_header_files) \
$(javax_naming_event_header_files) \
@ -7734,6 +7770,7 @@ ordinary_header_files = \
$(javax_swing_text_rtf_header_files) \
$(javax_swing_tree_header_files) \
$(javax_swing_undo_header_files) \
$(javax_tools_header_files) \
$(javax_transaction_header_files) \
$(javax_transaction_xa_header_files) \
$(org_ietf_jgss_header_files) \
@ -7784,23 +7821,10 @@ bc_objects = \
org-xml.lo
property_files = \
classpath/resource/gnu/classpath/tools/appletviewer/messages.properties \
classpath/resource/gnu/classpath/tools/common/Messages.properties \
classpath/resource/gnu/classpath/tools/getopt/Messages.properties \
classpath/resource/gnu/classpath/tools/jar/messages.properties \
classpath/resource/gnu/classpath/tools/jarsigner/MessageBundle.properties \
classpath/resource/gnu/classpath/tools/jarsigner/messages.properties \
classpath/resource/gnu/classpath/tools/keytool/MessageBundle.properties \
classpath/resource/gnu/classpath/tools/keytool/messages.properties \
classpath/resource/gnu/classpath/tools/native2ascii/messages.properties \
classpath/resource/gnu/classpath/tools/orbd/messages.properties \
classpath/resource/gnu/classpath/tools/rmic/messages.properties \
classpath/resource/gnu/classpath/tools/rmid/messages.properties \
classpath/resource/gnu/classpath/tools/rmiregistry/messages.properties \
classpath/resource/gnu/classpath/tools/serialver/messages.properties \
classpath/resource/gnu/classpath/tools/tnameserv/messages.properties \
classpath/resource/gnu/java/awt/font/fonts.properties \
classpath/resource/gnu/java/awt/peer/gtk/font.properties \
classpath/resource/gnu/java/awt/peer/x/fonts.properties \
classpath/resource/gnu/java/awt/peer/x/xfonts.properties \
classpath/resource/gnu/java/locale/LocaleInformation.properties \
classpath/resource/gnu/java/locale/LocaleInformation_aa.properties \
classpath/resource/gnu/java/locale/LocaleInformation_aa_DJ.properties \
@ -8081,8 +8105,6 @@ property_files = \
classpath/resource/javax/imageio/plugins/jpeg/MessagesBundle.properties \
classpath/resource/javax/swing/text/html/default.css \
classpath/resource/org/ietf/jgss/MessagesBundle.properties \
classpath/resource/sun/rmi/rmic/messages.properties \
classpath/resource/com/sun/tools/javac/messages.properties \
classpath/resource/META-INF/services/java.util.prefs.PreferencesFactory \
classpath/resource/META-INF/services/java.util.prefs.PreferencesFactory.in \
classpath/resource/META-INF/services/javax.sound.midi.spi.MidiDeviceProvider \
@ -10424,6 +10446,12 @@ gnu/classpath/jdwp/value.list: $(gnu_classpath_jdwp_value_source_files)
-include gnu/classpath/jdwp/value.deps
gnu/classpath/toolkit.list: $(gnu_classpath_toolkit_source_files)
@$(mkinstalldirs) $(dir $@)
echo $(srcdir)/classpath/lib/gnu/classpath/toolkit/*.class > gnu/classpath/toolkit.list
-include gnu/classpath/toolkit.deps
gnu/gcj.list: $(gnu_gcj_source_files)
@$(mkinstalldirs) $(dir $@)
echo $(srcdir)/classpath/lib/gnu/gcj/*.class > gnu/gcj.list
@ -11692,6 +11720,18 @@ javax/management/openmbean.list: $(javax_management_openmbean_source_files)
-include javax/management/openmbean.deps
javax/management/remote.list: $(javax_management_remote_source_files)
@$(mkinstalldirs) $(dir $@)
echo $(srcdir)/classpath/lib/javax/management/remote/*.class > javax/management/remote.list
-include javax/management/remote.deps
javax/management/remote/rmi.list: $(javax_management_remote_rmi_source_files)
@$(mkinstalldirs) $(dir $@)
echo $(srcdir)/classpath/lib/javax/management/remote/rmi/*.class > javax/management/remote/rmi.list
-include javax/management/remote/rmi.deps
javax/naming.list: $(javax_naming_source_files)
@$(mkinstalldirs) $(dir $@)
echo $(srcdir)/classpath/lib/javax/naming/*.class > javax/naming.list
@ -11943,6 +11983,12 @@ javax/swing/undo.list: $(javax_swing_undo_source_files)
-include javax/swing/undo.deps
javax/tools.list: $(javax_tools_source_files)
@$(mkinstalldirs) $(dir $@)
echo $(srcdir)/classpath/lib/javax/tools/*.class > javax/tools.list
-include javax/tools.deps
javax/transaction.list: $(javax_transaction_source_files)
@$(mkinstalldirs) $(dir $@)
echo $(srcdir)/classpath/lib/javax/transaction/*.class > javax/transaction.list

2
libjava/aclocal.m4 vendored
View File

@ -350,7 +350,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([AM_PROG_GCJ],[
AC_CHECK_PROGS(GCJ, [gcj gcj-3.2 gcj-3.1 gcj-3.0 gcj-2.95], gcj)
AC_CHECK_PROGS(GCJ, gcj, gcj)
test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
if test "x${GCJFLAGS-unset}" = xunset; then
GCJFLAGS="-g -O2"

View File

@ -39,7 +39,9 @@ Bryce McKinlay (bryce@waitaki.otago.ac.nz)
Audrius Meskauskas (audriusa@Bioinformatics.org)
Raif S. Naffah (raif@swiftdsl.com.au)
Aaron M. Renn (arenn@urbanophile.com)
Ian Rogers (ian.rogers@manchester.ac.uk)
Andrew Selkirk (aselkirk@sympatico.ca)
Robert Schuster (robertschuster@fsfe.org)
Christian Thalinger (twisti@complang.tuwien.ac.at)
Andreas Tobler (a.tobler@schweiz.org)
Mario Torre (neugens@limasoftware.net)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,14 @@
2008-06-28 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_javac.m4: Disable check for JAVAC, when
not configured with --enable-java-maintainer-mode.
* aclocal.m4, configure: Regenerate.
* native/jni/gstreamer-peer/Makefile.am: Do not link with
libclasspathnative.
* native/jni/gstreamer-peer/Makefile.in: Regenerate.
* tools/Makefile.am, lib/Makefile.am: Use JAVAC for setting
JCOMPILER, drop flags not understood by gcj.
2008-06-24 Tom Tromey <tromey@redhat.com>
PR libgcj/32198:
@ -6,6 +17,62 @@
* tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.class:
Rebuilt.
2008-04-18 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/35457
* aclocal.m4: Regenerate.
* configure: Regenerate.
2008-04-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/gen-classlist.sh.in: Avoid grepping each omission, by
building an awk script with a hash for literal files, and
awk regular expressions for the rest.
* configure.ac: Call AC_PROG_AWK.
* configure: Regenerate.
* m4/gcc_attribute.m4 (GCC_ATTRIBUTE): Fix cache variable name.
* tools/Makefile.am (gappletviewer, gjarsigner, gkeytool, gjar)
(gnative2ascii, gserialver, gjavah, grmiregistry, gtnameserv)
(gorbd, grmid, grmic) [!CREATE_WRAPPERS]: Add stub dependencies
for these scripts, to trick automake into hiding the respective
rules for the programs below the CREATE_WRAPPERS conditional.
* aclocal.m4: Regenerate.
* configure: Likewise.
* Makefile.in: Likewise.
* native/jni/Makefile.in: Likewise.
* native/jni/classpath/Makefile.in: Likewise.
* native/jni/gstreamer-peer/Makefile.in: Likewise.
* native/jni/midi-dssi/Makefile.in: Likewise.
* native/jni/gconf-peer/Makefile.in: Likewise.
* native/jni/java-io/Makefile.in: Likewise.
* native/jni/native-lib/Makefile.in: Likewise.
* native/jni/java-util/Makefile.in: Likewise.
* native/jni/java-lang/Makefile.in: Likewise.
* native/jni/midi-alsa/Makefile.in: Likewise.
* native/jni/java-nio/Makefile.in: Likewise.
* native/jni/java-net/Makefile.in: Likewise.
* native/jni/xmlj/Makefile.in: Likewise.
* native/jni/qt-peer/Makefile.in: Likewise.
* native/jni/gtk-peer/Makefile.in: Likewise.
* native/Makefile.in: Likewise.
* native/jawt/Makefile.in: Likewise.
* native/fdlibm/Makefile.in: Likewise.
* native/plugin/Makefile.in: Likewise.
* resource/Makefile.in: Likewise.
* scripts/Makefile.in: Likewise.
* tools/Makefile.in: Likewise.
* doc/Makefile.in: Likewise.
* doc/api/Makefile.in: Likewise.
* lib/Makefile.in: Likewise.
* external/Makefile.in: Likewise.
* external/jsr166/Makefile.in: Likewise.
* external/sax/Makefile.in: Likewise.
* external/w3c_dom/Makefile.in: Likewise.
* external/relaxngDatatype/Makefile.in: Likewise.
* include/Makefile.in: Likewise.
* examples/Makefile.in: Likewise.
2008-04-17 Tom Tromey <tromey@redhat.com>
PR libgcj/35950:
@ -13,6 +80,22 @@
Classpath.
* tools/classes/gnu/classpath/tools/jar/Entry.class: Update.
2008-03-10 Jim Meyering <meyering@redhat.com>
Don't leak upon failed realloc.
* native/jni/classpath/jcl.c (JCL_realloc): Upon failed realloc,
free the original buffer before throwing the exception.
2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/cp-hacking.texinfo: Fix spacing after periods.
* doc/cp-tools.texinfo: Likewise.
* doc/cp-vmintegration.texinfo: Likewise.
* doc/cp-hacking.texinfo: Fix some typos.
* doc/cp-tools.texinfo: Likewise.
* doc/cp-vmintegration.texinfo: Likewise.
2008-03-02 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
@ -42,6 +125,16 @@
* tools/classes/gnu/classpath/tools/native2ascii/Native2ASCII$3.class:
Added.
2008-01-27 Bernhard Fischer <rep.dot.nop@gmail.com>
* java/util/SimpleTimeZone.java (SimpleTimeZone): Fix typo in comment.
* gnu/CORBA/GIOP/v1_2/RequestHeader.java (RequestHeader): Fix typo in
exception message.
2008-01-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/README.jaxp: Fix typos.
2007-09-04 Matthias Klose <doko@ubuntu.com>
* configure.ac: Append libgcj soversion to nativeexeclibdir.

View File

@ -1,8 +1,8 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
@ -10,7 +10,10 @@ unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@ -23,9 +26,9 @@ debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
`./configure' to configure the package for your system.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
@ -67,6 +67,9 @@ The simplest way to compile this package is:
all sorts of other programs in order to regenerate files that came
with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options
=====================
@ -78,7 +81,7 @@ details on some of the pertinent environment variables.
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
@ -87,17 +90,15 @@ Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
Installation Names
==================
@ -190,12 +191,12 @@ them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
overridden in the site shell script).
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================

View File

@ -1,6 +1,7 @@
## Input file for automake to generate the Makefile.in used by configure
# lib first, to compile .class files before native code, last examples
## GCJ LOCAL: unconditionally build tools subdur
SUBDIRS = lib doc external include native resource scripts tools $(EXAMPLESDIR)
DIST_SUBDIRS = lib doc external include native resource scripts tools examples
@ -15,7 +16,8 @@ EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \
ChangeLog.gnujaxp.1 ChangeLog.gnujaxp.2 ChangeLog.libxmlj \
autogen.sh
#DISTCHECK_CONFIGURE_FLAGS = --enable-gjdoc
DISTCHECK_CONFIGURE_FLAGS = --with-gjdoc --enable-gstreamer-peer \
--enable-xmlj --enable-qt-peer
dist-hook:
-$(mkinstalldirs) $(distdir)/include

View File

@ -67,6 +67,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -177,7 +179,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -189,19 +190,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -233,15 +223,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -289,10 +276,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@
@ -376,6 +361,9 @@ EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \
ChangeLog.gnujaxp.1 ChangeLog.gnujaxp.2 ChangeLog.libxmlj \
autogen.sh
DISTCHECK_CONFIGURE_FLAGS = --with-gjdoc --enable-gstreamer-peer \
--enable-xmlj --enable-qt-peer
all: all-recursive
.SUFFIXES:
@ -828,8 +816,6 @@ uninstall-info: uninstall-info-recursive
native: lib
#DISTCHECK_CONFIGURE_FLAGS = --enable-gjdoc
dist-hook:
-$(mkinstalldirs) $(distdir)/include
-cp -f $(top_srcdir)/include/*.in $(distdir)/include

View File

@ -1,9 +1,61 @@
New in release 0.96
Bug fixes in release 0.97.2 (Jun 06, 2007)
* Include headers in the release tarball.
* Allow the building of tools to be optional.
* Only check for a Java compiler when required.
* Allow VMOperatingSystemMXBeanImpl to compile on Solaris.
* Documentation typo fixes
* Fix memory leak in native/jni/classpath/jcl.c
* Web page updates (PR classpath/22883)
* Fixes to pass the JSR166 TCK
* Use awk to construct the classlist on building
* Fix deadlock in Logger (PR classpath/35974)
* Fix regression in java.lang.String (PR classpath/35482)
* Allow Classpath tools to handle @file options.
* Allow parseInt to handle a + prefix correctly.
* Remove use of 1.5 language constructs in the VM layer.
Bug fixes in release 0.97.1 (Mar 11, 2007)
* Include documentation for JSR166 (java.util.concurrent)
* Fix STaX API compatability.
* Include the tools properties file in the release tarball.
New in release 0.97 (Feb 22, 2007)
Build changes:
* A copy of javah (to produce C header files from Java source code)
is now required to generate the files in include.
* The javac check has been changed so that it attempts to find ecj,
javac and gcj (in that order). You may override this by using
JAVAC=<preferred javac>
Runtime interface changes:
* Removed VMFloat.floatToIntBits amd VMDouble.doubleToLongBits.
* Added new getParameterAnnotations() methods in Constructor and Method.
New in release 0.96.1 (Oct 16, 2007)
* Small compile, configure and build fixes.
New in release 0.96 (Oct 15, 2007)
* New experimental GStreamer javax.sound peer (see README.gstreamer)
* The JNI interface has been updated to 1.6
* Better support for the OpenJDK javac compiler
* Support for using javah via tools.zip and com.sun.tools.javah.Main
* Much improved Escher AWT peers
* Many bug fixes including improvements to AWT and Swing support
Runtime interface changes:
* Add VMFloat.toString(float) and VMFloat.parseFloat(String). Default
implementations are the same as previous behavior.
* Add new default implementations of VMMemoryMXBean.getHeapUsage()
and VMMemoryMXBean.getNonHeapUsage() via iteration over the memory
pools of the appropriate type.
New in release 0.95 (Apr 23, 2007)

View File

@ -41,6 +41,7 @@ Patrik Reali (reali@inf.ethz.ch)
Petter Reinholdtsen (pere@hungry.com)
Julian Scheid (julian.scheid@sektor37.de)
Martin Schröder (ms@artcom-gmbh.de)
Robert Schuster (robertschuster@fsfe.org)
Gaute Smaaland (gs@sevenmountains.no)
Michael Smith (msmith@spinnakernet.com)
J. Russell Smyth (drfish@uswest.net)

View File

@ -911,6 +911,8 @@ m4_include([../../libtool.m4])
m4_include([../../ltoptions.m4])
m4_include([../../ltsugar.m4])
m4_include([../../ltversion.m4])
m4_include([m4/ac_prog_javac.m4])
m4_include([m4/ac_prog_javac_works.m4])
m4_include([m4/acattribute.m4])
m4_include([m4/accross.m4])
m4_include([m4/acinclude.m4])

View File

@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2006-12-08'
timestamp='2008-04-14'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -56,8 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -330,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:SunOS:5.*:*)
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
@ -532,7 +532,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[45])
*:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@ -781,7 +781,7 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
i*:MINGW*:*)
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@ -791,12 +791,18 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
*:Interix*:[3456]*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@ -830,7 +836,14 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -951,8 +964,8 @@ EOF
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
xtensa:Linux:*:*)
echo xtensa-unknown-linux-gnu
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@ -972,9 +985,6 @@ EOF
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
@ -1203,6 +1213,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@ -1218,6 +1231,9 @@ EOF
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@ -1468,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be

View File

@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2006-12-08'
timestamp='2008-04-14'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -72,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -250,13 +250,14 @@ case $basic_machine in
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore \
| mep \
| maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
@ -332,13 +333,14 @@ case $basic_machine in
| ip2k-* | iq2000-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mep-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@ -366,15 +368,19 @@ case $basic_machine in
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@ -445,6 +451,14 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
c90)
basic_machine=c90-cray
os=-unicos
@ -477,8 +491,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
cr16)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@ -516,6 +530,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@ -670,6 +688,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
@ -685,6 +711,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
@ -811,6 +841,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
@ -1019,6 +1057,10 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
@ -1224,7 +1266,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1354,6 +1396,9 @@ case $os in
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-none)
;;
*)
@ -1419,6 +1464,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;

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.96-pre],[classpath@gnu.org],[classpath])
AC_INIT([GNU Classpath],[0.97.2],[classpath@gnu.org],[classpath])
AC_CONFIG_SRCDIR(java/lang/System.java)
dnl GCJ LOCAL
@ -338,13 +338,17 @@ dnl -----------------------------------------------------------
dnl Regenerate headers at build time (disabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([regen-headers],
[AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])],
[AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=yes if headers don't exist])],
[case "${enableval}" in
yes) REGENERATE_JNI_HEADERS=yes ;;
no) REGENERATE_JNI_HEADERS=no ;;
*) REGENERATE_JNI_HEADERS=no ;;
*) REGENERATE_JNI_HEADERS=yes ;;
esac],
[REGENERATE_JNI_HEADERS=no])
[if test -e include/java_lang_VMSystem.h; then
REGENERATE_JNI_HEADERS=no ;
else
REGENERATE_JNI_HEADERS=yes ;
fi])
AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)
dnl -----------------------------------------------------------
@ -416,6 +420,8 @@ if test "x${COMPILE_JNI}" = xyes; then
dnl On that system, sys/ioctl.h will not include sys/filio.h unless
dnl BSD_COMP is defined; just including sys/filio.h is simpler.
dnl Check for crt_externs.h on Darwin.
dnl Check for netinet/in_systm.h, netinet/ip.h and net/if.h for Windows CE.
dnl Check for sys/loadavg.h for getloadavg() on Solaris 9.
AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
asm/ioctls.h \
inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
@ -426,7 +432,9 @@ if test "x${COMPILE_JNI}" = xyes; then
sys/mman.h \
magic.h \
sys/event.h sys/epoll.h \
ifaddrs.h])
ifaddrs.h \
netinet/in_systm.h netinet/ip.h net/if.h \
sys/loadavg.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]))
@ -442,11 +450,12 @@ if test "x${COMPILE_JNI}" = xyes; then
gethostbyname_r localtime_r \
strerror_r \
fcntl \
statvfs \
mmap munmap mincore msync madvise getpagesize sysconf \
lstat readlink \
inet_aton inet_addr inet_pton \
getifaddrs kqueue kevent epoll_create \
readdir_r getloadavg])
getloadavg])
LIBMAGIC=
AC_CHECK_LIB(magic, magic_open, LIBMAGIC=-lmagic)
@ -539,11 +548,13 @@ if test "x${COMPILE_JNI}" = xyes; then
if test "$no_x" = yes; then
AC_MSG_ERROR([GTK+ peers requested but no X library available])
fi
dnl We explicitly want the XTest Extension for Robot support.
dnl Check if we can link against the XTest library and set
dnl HAVE_XTEST accordingly.
AC_CHECK_LIB([Xtst], [XTestQueryExtension],
[XTEST_LIBS="$XTEST_LIBS -lX11 -lXtst"],
[AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
[${X_LIBS}])
[AC_DEFINE(HAVE_XTEST, 1, [Define to 1 if you have libXtst.])[XTEST_LIBS="$XTEST_LIBS -X11 -lXtst"]],
[true],
[${X_LIBS}])
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
PKG_CHECK_MODULES(FREETYPE2, freetype2)
@ -586,7 +597,7 @@ if test "x${COMPILE_JNI}" = xyes; then
dnl compiled in
USE_GCONF_PREFS_PEER=$enable_default_preferences_peer
if test "$USE_GCONF_PREFS_PEER" = ""; then
DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory
DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory
fi
fi
@ -614,6 +625,10 @@ if test "x${COMPILE_JNI}" = xyes; then
GST_PLUGIN_LDFLAGS='-module -avoid-version -Wno-unused-parameter -no-undefined'
AC_SUBST(GST_PLUGIN_LDFLAGS)
PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.8)
AC_SUBST(GDK_CFLAGS)
AC_SUBST(GDK_LIBS)
dnl set the gstreamer based file reader, writer and mixer
GSTREAMER_FILE_READER=gnu.javax.sound.sampled.gstreamer.io.GstAudioFileReader
@ -773,8 +788,6 @@ if test "x${COMPILE_JNI}" = xyes; then
AC_CONFIG_LINKS([$ac_config_links_1])
fi
CLASSPATH_FIND_JAVAC
CLASSPATH_WITH_CLASSLIB
dnl -----------------------------------------------------------
@ -935,6 +948,16 @@ esac;
AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue)
AC_SUBST(PATH_TO_GLIBJ_ZIP)
# Check for javac if we need to build either the class library,
# the examples or the tools
if test "x${use_glibj_zip}" = xfalse || \
test "x${EXAMPLESDIR}" != x || \
test "x${TOOLSDIR}" != x && \
test "x${build_class_files}" != xno; then
AC_PROG_JAVAC
CLASSPATH_JAVAC_MEM_CHECK
fi
dnl -----------------------------------------------------------
dnl Build with Escher based X peers.
dnl -----------------------------------------------------------
@ -1030,6 +1053,7 @@ scripts/classpath.spec
lib/Makefile
lib/gen-classlist.sh
lib/copy-vmresources.sh
scripts/check_jni_methods.sh
tools/Makefile
examples/Makefile
examples/Makefile.jawt

View File

@ -1,9 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
scriptversion=2007-03-29.01
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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
@ -91,7 +92,20 @@ gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
@ -201,34 +215,39 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@ -276,6 +295,46 @@ icc)
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@ -288,13 +347,13 @@ tru64)
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is

View File

@ -49,6 +49,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -154,7 +156,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -166,19 +167,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -210,15 +200,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -266,10 +253,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@

View File

@ -2,7 +2,7 @@ if CREATE_API_DOCS
noinst_DATA = html
endif
sourcepath = $(top_builddir):$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax
sourcepath = $(top_builddir):$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:$(top_srcdir)/external/jsr166
classpathbox = "<span class='logo'><a href='http://www.gnu.org/software/classpath' target='_top'>GNU Classpath</a> ($(VERSION))"

View File

@ -50,6 +50,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -131,7 +133,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -143,19 +144,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -187,15 +177,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -243,10 +230,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@
@ -319,7 +304,7 @@ target_vendor = @target_vendor@
toolexeclibdir = @toolexeclibdir@
vm_classes = @vm_classes@
@CREATE_API_DOCS_TRUE@noinst_DATA = html
sourcepath = $(top_builddir):$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax
sourcepath = $(top_builddir):$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:$(top_srcdir)/external/jsr166
classpathbox = "<span class='logo'><a href='http://www.gnu.org/software/classpath' target='_top'>GNU Classpath</a> ($(VERSION))"
all: all-am

View File

@ -121,12 +121,12 @@ Localization
@comment node-name, next, previous, up
@chapter Introduction
The GNU Classpath Project is a dedicated to providing a 100% free,
The GNU Classpath Project is dedicated to providing a 100% free,
clean room implementation of the standard core class libraries for
compilers and runtime environments for the java programming language.
It offers free software developers an alternative core library
implementation upon which larger java-like programming environments
can be build. The GNU Classpath Project was started in the Spring of
can be built. The GNU Classpath Project was started in the Spring of
1998 as an official Free Software Foundation project. Most of the
volunteers working on GNU Classpath do so in their spare time, but a
couple of projects based on GNU Classpath have paid programmers to
@ -225,7 +225,7 @@ java.net package, there are non-public classes for implementing sockets.
Without those classes, the public socket interface is useless. But do
not feel obligated to completely implement all of the functionality at
once. For example, in the java.net package, there are different types
of protocol handlers for different types of URL's. Not all of these
of protocol handlers for different types of URLs. Not all of these
need to be written at once.
@item
@ -278,8 +278,8 @@ While free operating systems are the top priority, the other priorities
can shift depending on whether or not there is a volunteer to port
Classpath to those platforms and to test releases.
Eventually we hope the Classpath will support all JVM's that provide
JNI or CNI support. However, the top priority is free JVM's. A small
Eventually we hope the Classpath will support all JVMs that provide
JNI or CNI support. However, the top priority is free JVMs. A small
list of Compiler/VM environments that are currently actively
incorporating GNU Classpath is below. A more complete overview of
projects based on GNU classpath can be found online at
@ -292,38 +292,40 @@ Classpath stories page}.
@item
@uref{http://jamvm.sourceforge.net/,jamvm}
@item
@uref{http://kissme.sourceforge.net/,Kissme}
@uref{http://www.cacaojvm.org/,cacao}
@item
@uref{http://www.ibm.com/developerworks/oss/jikesrvm/,Jikes RVM}
@item
@uref{http://www.sablevm.org/,SableVM}
@uref{http://jikesrvm.org,Jikes RVM}
@item
@uref{http://www.kaffe.org/,Kaffe}
@item
@uref{http://www.ikvm.net/,IKVM}
@end enumerate
As with OS platform support, this priority list could change if a
volunteer comes forward to port, maintain, and test releases for a
particular JVM@. Since gcj is part of the GNU Compiler Collective it
is one of the most important targets. But since it doesn't currently
work out of the box with GNU Classpath it is currently not the easiest
target. When hacking on GNU Classpath the easiest is to use
compilers and runtime environments that that work out of the box with
it, such as the jikes compiler and the runtime environments jamvm and
kissme. But you can also work directly with targets like gcj and
kaffe that have their own copy of GNU Classpath currently. In that
case changes have to be merged back into GNU Classpath proper though,
which is sometimes more work. SableVM is starting to migrate from an
integrated GNU Classpath version to being usable with GNU Classpath
out of the box.
work out of the box with GNU Classpath it is not the easiest
target. When hacking on GNU Classpath the easiest solution is to use
compilers and runtime environments that work out of the box with
it, such as the Eclipse compiler, ecj, and the runtime environments jamvm and
cacao. Both Jikes RVM and Kaffe use an included version of GNU Classpath by
default, but Kaffe can now use a pre-installed version and Jikes RVM supports
using a CVS snapshot as well as the latest release. Working directly with
targets such as Jikes RVM, gcj and IKVM is possible but can be a little more
difficult as changes have to be merged back into GNU Classpath proper,
which requires additional work. Due to a recent switch to the use of 1.5 language
features within GNU Classpath, a compiler compatible with these features is required.
At present, this includes the Eclipse compiler, ecj, and the OpenJDK compiler.
The initial target version for Classpath is the 1.1 spec. Higher
versions can be implemented (and have been implemented, including lots
of 1.4 functionality) if desired, but please do not create classes
that depend on features in those packages unless GNU Classpath already
GNU Classpath currently implements the majority of the 1.4 and 1.5 APIs
(binary compatibility is above 95% for both, but does not take into account
internal implementations of features such as graphic and sound support). There
is support for some 1.6 APIs but this is still nascent. Please do not create classes
that depend on features in other packages unless GNU Classpath already
contains those features. GNU Classpath has been free of any
proprietary dependencies for a long time now and we like to keep it
that way. But finishing, polishing up, documenting, testing and
that way. Finishing, polishing up, documenting, testing and
debugging current functionality is of higher priority then adding new
functionality.
@ -332,11 +334,11 @@ functionality.
@chapter Needed Tools and Libraries
If you want to hack on Classpath, you should at least download and
install the following tools. And try to familiarize yourself with
them. Although in most cases having these tools installed will be all
install the following tools and try to familiarize yourself with
them. In most cases having these tools installed will be all
you really need to know about them. Also note that when working on
(snapshot) releases only GCC 3.3+ (plus a free VM from the list above
and the libraries listed below) is needed. The other tools are only
(snapshot) releases only a 1.5 compiler (plus a free VM from the list above
and the libraries listed below) is required. The other tools are only
needed when working directly on the CVS version.
@itemize @bullet
@ -446,8 +448,8 @@ When working from CVS you can run those tools by executing
For building the Java bytecode (.class files), you can select
which compiler should be employed using @option{--with-javac} or
@option{--with-ecj} as argument to @command{configure};
the present default is @command{ecj}.
@option{--with-ecj} as an argument to @command{configure};
the present default is @command{ecj} if found.
Instead of @command{ecj}, you can also use @command{javac}, which is
available at
@ -563,12 +565,25 @@ configuration settings in GNOME.
@end table
The GStreamer backend for javax.sound.sampled (The Java Sound API, not
including the MIDI portion) needs the following library headers:
@table @b
@item GStreamer
@uref{http://gstreamer.freedesktop.org/,GStreamer} version 0.10.10
(or higher). You will also need at least gstreamer-base and
gstreamer-plugins-base. More plugins can be used to allow streaming of
different sound types but are not a compile time requirement. See
README.gstreamer in the source distribution for more informations.
@end table
For building @command{gcjwebplugin} you'll need the Mozilla plugin
support headers and libraries, which are available at
@uref{http://www.mozilla.org,www.mozilla.org}.
For enabling the com.sun.tools.javac support in tools.zip you
will a need jar file containing the Eclipse Java Compiler.
will need a jar file containing the Eclipse Java Compiler.
Otherwise com.sun.tools.javac will not be included in @file{tools.zip}.
For building the xmlj JAXP implementation (disabled by default,
@ -591,7 +606,7 @@ that are not part of GNU Classpath proper, but that have been included
to provide certain needed functionality. All these external libraries
should be clearly marked as such. In general we try to use as much as
possible the clean upstream versions of these sources. That way
merging in new versions will be easiest. You should always try to get
merging in new versions will be easier. You should always try to get
bug fixes to these files accepted upstream first. Currently we
include the following 'external' libraries. Most of these sources are
included in the @file{external} directory. That directory also
@ -599,10 +614,24 @@ contains a @file{README} file explaining how to import newer versions.
@table @b
@item GNU jaxp
Can be found in @file{external/jaxp}. Provides javax.xml, org.w3c and
org.xml packages. Upstream is
@uref{http://www.gnu.org/software/classpathx/,GNU ClasspathX}.
@item JSR166 concurrency support
Can be found in @file{external/jsr166}. Provides java.util.concurrent
and its subpackages. Upstream is
@uref{http://g.oswego.edu/dl/concurrency-interest/,Doug Lea's Concurrency Interest Site}.
@item RelaxNG Datatype Interfaces
Can be found in @file{external/relaxngDatatype}. Provides org.relaxng.datatype
and its subpackages. Upstream is
@uref{http://www.oasis-open.org/committees/relax-ng/}.
@item Simple API for XML (SAX)
Can be found in @file{external/sax}. Provides org.xml.sax and its subpackages.
Upstream is
@uref{http://www.saxproject.org}.
@item Document Object Model (DOM) bindings
Can be found in @file{external/w3c_dom}. Provides org.w3c.dom and its subpackages.
Upstream locations are listed in @file{external/w3c_dom/README}.
@item fdlibm
Can be found in @file{native/fdlibm}. Provides native implementations
@ -694,6 +723,10 @@ use prebuilt glibj.zip class library
specify jar file containing the Eclipse Java Compiler
@item --with-gstreamer-peer
build the experimental GStreamer peer (see @file{README.gstreamer})
@end table
For more flags run @command{configure --help}.
@ -770,7 +803,7 @@ The @option{--enable-maintainer-mode} option to @command{configure} currently do
little and shouldn't be used by ordinary developers or users anyway.
On Windows machines, the native libraries do not currently build, but
the Java bytecode library will. Gcj trunk is beginning to work under
the Java bytecode library will. GCJ trunk is beginning to work under
Cygwin.
@node Programming Standards, Hacking Code, Misc. Notes, Top
@ -1097,7 +1130,7 @@ Patches that are already approved for libgcj or also OK for Classpath.
patches require you to think whether or not they are really OK and
non-controversial, or if you would like some feedback first on them
before committing. We might get real commit rules in the future, for
now use your own judgment, but be a bit conservative.
now use your own judgement, but be a bit conservative.
Always contact the GNU Classpath maintainer before adding anything
non-trivial that you didn't write yourself and that does not come from

View File

@ -526,10 +526,8 @@ compiler, and is specific to the compiler implementation.
of doubles.
@itemize @bullet
@item @code{doubleToLongBits(double)} -- Converts the double to the IEEE 754
bit layout, collapsing NaNs to @code{0x7ff8000000000000L}.
@item @code{doubleToRawLongBits(double)} -- Same as the above, but preserves
NaNs.
@item @code{doubleToRawLongBits(double)} -- Converts the double to the IEEE 754
bit layout, preserving NaNs.
@item @code{longBitsToDouble(long)} -- This is the inverse of the last method,
preserving NaNs so that the output of one can be fed into the other without
data loss.
@ -552,10 +550,8 @@ implementation optional.
@code{VMFloat} provides native support for the conversion of floats.
@itemize @bullet
@item @code{floatToIntBits(float)} -- Converts the float to the IEEE 754
bit layout, collapsing NaNs to @code{0x7fc00000}.
@item @code{floatToRawIntBits(float)} -- Same as the above, but preserves
NaNs.
@item @code{floatToRawIntBits(float)} -- Converts the float to the IEEE 754
bit layout, preserving NaNs.
@item @code{intBitsToFloat(int)} -- This is the inverse of the last method,
preserving NaNs so that the output of one can be fed into the other without
data loss.

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,7 @@
## Input file for automake to generate the Makefile.in used by configure
GLIBJ_CLASSPATH='$(top_builddir)/lib':'$(top_builddir)/lib/glibj.zip':'$(top_builddir)/tools/tools.zip'
GLIBJ_CLASSPATH='$(top_builddir)/lib/glibj.zip'
# Setup the compiler to use the GNU Classpath library we just build
#if FOUND_GCJ
#JCOMPILER = $(GCJ) --bootclasspath '$(top_builddir)/lib' --classpath . -C
#else
#if FOUND_JIKES
#JCOMPILER = $(JIKES) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(top_builddir)/lib:.
#else
if FOUND_ECJ
JCOMPILER = $(ECJ) -1.5 -encoding UTF-8 -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
else
if FOUND_JAVAC
JCOMPILER = $(JAVAC) -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
else
error dunno how to setup the JCOMPILER and compile
#endif
#endif
endif
endif
JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip'
# All our example java source files
EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*/*.java

View File

@ -51,6 +51,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -140,7 +142,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -152,19 +153,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -196,15 +186,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -252,10 +239,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@
@ -327,19 +312,8 @@ target_os = @target_os@
target_vendor = @target_vendor@
toolexeclibdir = @toolexeclibdir@
vm_classes = @vm_classes@
GLIBJ_CLASSPATH = '$(top_builddir)/lib':'$(top_builddir)/lib/glibj.zip':'$(top_builddir)/tools/tools.zip'
@FOUND_ECJ_FALSE@@FOUND_JAVAC_TRUE@JCOMPILER = $(JAVAC) -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
# Setup the compiler to use the GNU Classpath library we just build
#if FOUND_GCJ
#JCOMPILER = $(GCJ) --bootclasspath '$(top_builddir)/lib' --classpath . -C
#else
#if FOUND_JIKES
#JCOMPILER = $(JIKES) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(top_builddir)/lib:.
#else
@FOUND_ECJ_TRUE@JCOMPILER = $(ECJ) -1.5 -encoding UTF-8 -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
#endif
#endif
GLIBJ_CLASSPATH = '$(top_builddir)/lib/glibj.zip'
JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip'
# All our example java source files
EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*/*.java
@ -568,7 +542,6 @@ uninstall-am: uninstall-exampleDATA uninstall-info-am uninstall-local
uninstall uninstall-am uninstall-exampleDATA uninstall-info-am \
uninstall-local
@FOUND_ECJ_FALSE@@FOUND_JAVAC_FALSE@error dunno how to setup the JCOMPILER and compile
# Make sure all sources and icons are also installed so users can use them.
# (Be careful to strip off the srcdir part of the path when installing.)

View File

@ -40,7 +40,6 @@ package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
import gnu.CORBA.OrbRestricted;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.portable.InputStream;

View File

@ -39,7 +39,6 @@ package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
import gnu.CORBA.OrbRestricted;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.TypeCode;

View File

@ -42,7 +42,6 @@ package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
import gnu.CORBA.OrbRestricted;
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.portable.InputStream;

View File

@ -41,7 +41,6 @@ package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
import gnu.CORBA.OrbRestricted;
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.TypeCode;

View File

@ -21,7 +21,6 @@ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
package gnu.classpath.examples.awt;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;

View File

@ -601,7 +601,7 @@ public class J2dBenchmark
void runTestSet(Graphics2D g, Dimension size)
{
// Any user-specified options (ie set transforms, rendering hints)
prepareGraphics((Graphics2D) g);
prepareGraphics(g);
if ((awtTests & J2DTEST_ARC) != 0)
{

View File

@ -22,34 +22,19 @@ package gnu.classpath.examples.management;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.management.DynamicMBean;
import javax.management.MBeanServer;
import javax.management.ObjectName;
public class TestBeans
{
public static void main(String[] args)
throws Exception
{
List beans = new ArrayList();
/* FIXME: When there's a server, this will be easier... :) */
beans.add(ManagementFactory.getOperatingSystemMXBean());
beans.add(ManagementFactory.getRuntimeMXBean());
beans.add(ManagementFactory.getThreadMXBean());
beans.add(ManagementFactory.getCompilationMXBean());
beans.add(ManagementFactory.getClassLoadingMXBean());
beans.add(ManagementFactory.getMemoryMXBean());
beans.addAll(ManagementFactory.getMemoryPoolMXBeans());
beans.addAll(ManagementFactory.getMemoryManagerMXBeans());
beans.addAll(ManagementFactory.getGarbageCollectorMXBeans());
Iterator it = beans.iterator();
while (it.hasNext())
{
DynamicMBean bean = (DynamicMBean) it.next();
if (bean != null)
System.out.println(bean.getMBeanInfo());
}
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
Set<ObjectName> names = server.queryNames(null, null);
for (ObjectName name : names)
System.out.println(server.getMBeanInfo(name));
}
}

View File

@ -23,10 +23,18 @@ package gnu.classpath.examples.management;
import java.lang.management.ClassLoadingMXBean;
import java.lang.management.ManagementFactory;
import static java.lang.management.ManagementFactory.CLASS_LOADING_MXBEAN_NAME;
import javax.management.Attribute;
import javax.management.MBeanServer;
import javax.management.ObjectName;
public class TestClassLoading
{
public static void main(String[] args)
throws Exception
{
System.out.println("Testing locally...");
ClassLoadingMXBean bean = ManagementFactory.getClassLoadingMXBean();
System.out.println("Bean: " + bean);
System.out.println("Loaded classes: " + bean.getLoadedClassCount());
@ -37,5 +45,33 @@ public class TestClassLoading
System.out.println("Changing verbose setting...");
bean.setVerbose(!verbosity);
System.out.println("Verbose class output: " + (bean.isVerbose() ? "yes" : "no"));
System.out.println("Testing via the server...");
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName classBean = new ObjectName(CLASS_LOADING_MXBEAN_NAME);
System.out.println("Bean: " + classBean);
System.out.println("Loaded classes: " + server.getAttribute(classBean, "LoadedClassCount"));
System.out.println("Unloaded classes: " + server.getAttribute(classBean,
"UnloadedClassCount"));
System.out.println("Total loaded classes: " + server.getAttribute(classBean,
"TotalLoadedClassCount"));
verbosity = (Boolean) server.getAttribute(classBean, "Verbose");
System.out.println("Verbose class output: " + (verbosity ? "yes" : "no"));
System.out.println("Changing verbose setting...");
server.setAttribute(classBean, new Attribute("Verbose", !verbosity));
System.out.println("Verbose class output: " + ((Boolean)
server.getAttribute(classBean, "Verbose") ?
"yes" : "no"));
System.out.println("Testing via the proxy...");
bean = ManagementFactory.newPlatformMXBeanProxy(server, CLASS_LOADING_MXBEAN_NAME,
ClassLoadingMXBean.class);
System.out.println("Bean: " + bean);
System.out.println("Loaded classes: " + bean.getLoadedClassCount());
System.out.println("Unloaded classes: " + bean.getUnloadedClassCount());
System.out.println("Total loaded classes: " + bean.getTotalLoadedClassCount());
verbosity = bean.isVerbose();
System.out.println("Verbose class output: " + (verbosity ? "yes" : "no"));
System.out.println("Changing verbose setting...");
bean.setVerbose(!verbosity);
System.out.println("Verbose class output: " + (bean.isVerbose() ? "yes" : "no"));
}
}

View File

@ -22,8 +22,6 @@ package gnu.classpath.examples.management;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryPoolMXBean;
import java.lang.management.MemoryUsage;
import java.util.Arrays;
import java.util.Iterator;

View File

@ -0,0 +1,222 @@
/* AudioPlayerSample.java -- Simple Java Audio Player
Copyright (C) 2007 Free Software Foundation, Inc.
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.examples.sound;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.UnsupportedAudioFileException;
/**
* A simple demo to show the use of the Java Sound API.
* It plays the given file (up to the end, so don't pass the 26 minutes long
* Pink Floyd's Echoes unless you really want!!).
*
* See: http://jsresources.org/examples/SimpleAudioPlayer.java.html
*
* @author Mario Torre <neugens@limasoftware.net>
*/
public class AudioPlayerSample
{
private static final int EXTERNAL_BUFFER_SIZE = 128000;
/**
* @param args
*/
public static void main(String[] args)
{
if (args.length < 1)
{
System.out.println("Radio Classpath -: Usage: " +
"AudioPlayerSample [file]");
return;
}
String file = args[0];
System.out.println("Welcome to Radio Classpath, only great music for you!");
System.out.println("Today's DJ Tap The WaterDroplet");
// now create the AudioInputStream
AudioInputStream audioInputStream = null;
try
{
audioInputStream = AudioSystem.getAudioInputStream(new File(file));
}
catch (UnsupportedAudioFileException e)
{
// This happen when the subsystem is unable to parse the kind of
// audio file we are submitting
// See the README for supported audio file types under Classpath
// for the version you are using.
e.printStackTrace();
return;
}
catch (IOException e)
{
e.printStackTrace();
return;
}
// get informations about the kind of file we are about to play
AudioFormat audioFormat = audioInputStream.getFormat();
System.out.println("Playing file: " + file);
System.out.println("format: " + audioFormat.toString());
System.out.print("Additional properties: ");
// now, we try to get all the properties we have in this AudioFormat
// and display them
Map<String, Object> properties = audioFormat.properties();
if (properties.size() < 0)
{
System.out.println("none");
}
else
{
System.out.println("found #" + properties.size() + " properties");
for (String key : properties.keySet())
{
System.out.println(key + ": " + properties.get(key));
}
}
// let's setup things for playing
// first, we require a Line. As we are doing playing, we will ask for a
// SourceDataLine
SourceDataLine line = null;
// To get the source line, we first need to build an Info object
// this is done in one line:
DataLine.Info info = new DataLine.Info(SourceDataLine.class, audioFormat);
System.out.println("searching line...");
// usually, if a backend can parse a file type, it can also
// create a line to handle it, but that's not guaranteed
// so we need to take care and to handle a possible
// LineUnavailableException
try
{
line = (SourceDataLine) AudioSystem.getLine(info);
System.out.println("line found, opening...");
// once created, a line must be opened to let data flow
// though it.
line.open(audioFormat);
}
catch (LineUnavailableException e)
{
// in a real application you should signal that in a kindly way to
// your users
e.printStackTrace();
return;
}
catch (Exception e)
{
e.printStackTrace();
return;
}
// an open line pass data to the backend only when it is in
// a state called "started" ("playing" or "play" in some other
// framework)
System.out.print("starting line... ");
line.start();
System.out.println("done");
// now we can start reading data from the AudioStream and writing
// data to the pipeline. The Java Sound API is rather low level
// so let you pass up to one byte of data at a time
// (with some constraints, refer to the API documentation to know more)
// We will do some buffering. You may want to check the frame size
// to allow a better buffering, also.
System.out.println("now playing...");
int nBytesRead = 0;
byte[] abData = new byte[EXTERNAL_BUFFER_SIZE];
while (nBytesRead != - 1)
{
try
{
nBytesRead = audioInputStream.read(abData, 0, abData.length);
}
catch (IOException e)
{
e.printStackTrace();
}
if (nBytesRead >= 0)
{
// this method returns the number of bytes actuall written
// to the line. You may want to use this number to check
// for events, display the current position (give also a
// look to the API for other ways of doing that) etc..
line.write(abData, 0, nBytesRead);
}
}
System.out.print("stream finished, draining line... ");
// call this method to ensure that all the data in the internal buffer
// reach the audio backend, otherwise your application will
// cut the last frames of audio data (and users will not enjoy the last
// seconds of their precious music)
line.drain();
// Once done, we can close the line. Note that a line, once closed
// may not be reopened (depends on the backend, in some cases a "reopen",
// if allowed, really opens a new line, reallocating all the resources)
System.out.println("line drained, now exiting");
line.close();
System.out.println("We hope you enjoyed Radio Classpath!");
}
}

View File

@ -44,7 +44,6 @@ import javax.swing.text.AbstractDocument;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.DocumentFilter;
import javax.swing.text.TextAction;
/**
* A demonstration of the <code>javax.swing.text.DocumentFilter</code> class.

View File

@ -41,25 +41,18 @@ package gnu.classpath.examples.swing;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.text.DateFormat;
import java.util.Date;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory;
import javax.swing.DefaultCellEditor;
import javax.swing.DefaultListCellRenderer;
import javax.swing.Icon;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JSlider;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.border.Border;
import javax.swing.plaf.metal.MetalIconFactory;

View File

@ -49,6 +49,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -138,7 +140,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -150,19 +151,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -194,15 +184,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -250,10 +237,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@

View File

@ -49,6 +49,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -129,7 +131,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -141,19 +142,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -185,15 +175,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -241,10 +228,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@

View File

@ -49,6 +49,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -129,7 +131,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -141,19 +142,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -185,15 +175,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -241,10 +228,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@

View File

@ -49,6 +49,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -129,7 +131,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -141,19 +142,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -185,15 +175,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -241,10 +228,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@

View File

@ -49,6 +49,8 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../ltoptions.m4 \
$(top_srcdir)/../../ltsugar.m4 \
$(top_srcdir)/../../ltversion.m4 \
$(top_srcdir)/m4/ac_prog_javac.m4 \
$(top_srcdir)/m4/ac_prog_javac_works.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
@ -129,7 +131,6 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EGREP = @EGREP@
ENABLE_LOCAL_SOCKETS_FALSE = @ENABLE_LOCAL_SOCKETS_FALSE@
@ -141,19 +142,8 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
FASTJAR = @FASTJAR@
FGREP = @FGREP@
FIND = @FIND@
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
FOUND_JAVAC_FALSE = @FOUND_JAVAC_FALSE@
FOUND_JAVAC_TRUE = @FOUND_JAVAC_TRUE@
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
FREETYPE2_LIBS = @FREETYPE2_LIBS@
GCJ = @GCJ@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
GDK_CFLAGS = @GDK_CFLAGS@
@ -185,15 +175,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAVAC = @JAVAC@
JAVAC_MEM_OPT = @JAVAC_MEM_OPT@
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@
JAVA_MAINTAINER_MODE_TRUE = @JAVA_MAINTAINER_MODE_TRUE@
JAY = @JAY@
JAY_SKELETON = @JAY_SKELETON@
JIKES = @JIKES@
JIKESENCODING = @JIKESENCODING@
JIKESWARNINGS = @JIKESWARNINGS@
KJC = @KJC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDEBUG = @LIBDEBUG@
@ -241,10 +228,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
STRIP = @STRIP@
USER_CLASSLIB = @USER_CLASSLIB@
TOOLSDIR = @TOOLSDIR@
USER_JAVAH = @USER_JAVAH@
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
USE_ESCHER_FALSE = @USE_ESCHER_FALSE@
USE_ESCHER_TRUE = @USE_ESCHER_TRUE@
USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@

View File

@ -45,7 +45,6 @@ import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.TypeCodePackage.BadKind;
/**
@ -128,9 +127,6 @@ public class BigDecimalHelper
*
* @param out a stream to write into.
* @param x a big decimal to write.
* @param digits a number of the decimal digits in the record
* being written. For the smaller
* numbers, zeroes are added to the left.
*
* @throws IOException if the stream write method throws one.
* @throws BadKind if this BigDecimal has more digits than

View File

@ -38,7 +38,6 @@ exception statement from your version. */
package gnu.CORBA;
import java.util.Arrays;
import java.util.Comparator;
/**

View File

@ -195,9 +195,9 @@ public abstract class AbstractCdrInput
* Set the Big Endian or Little Endian encoding. The stream reads Big Endian
* by default.
*
* @param use_little_endian if true, the stream expect the multi-byte data in
* the form "less significant byte first" (Little Endian). This is the
* opposite to the java standard (Big Endian).
* @param use_big_endian if true, the stream expect the multi-byte data in
* the form "most significant byte first" (Big Endian). This is the
* java standard.
*/
public void setBigEndian(boolean use_big_endian)
{
@ -208,7 +208,7 @@ public abstract class AbstractCdrInput
/**
* Get the used encoding.
*
* @param true for Big Endian, false for Little Endian.
* @return true for Big Endian, false for Little Endian.
*/
public boolean isBigEndian()
{
@ -654,7 +654,7 @@ public abstract class AbstractCdrInput
byte[] r = new byte[l];
int n = 0;
reading: while (n < r.length)
while (n < r.length)
{
n += read(r, n, r.length - n);
}

View File

@ -291,7 +291,7 @@ public abstract class AbstractCdrOutput
/**
* Write a single byte.
* @param a byte to write (low 8 bits are written).
* @param n byte to write (low 8 bits are written).
*/
public void write(int n)
{
@ -497,7 +497,7 @@ public abstract class AbstractCdrOutput
* Writes the lower bytes of the passed array members.
*
* @param chars an array
* @param offsets offset
* @param offset offset
* @param length length
*/
public void write_char_array(char[] chars, int offset, int length)

View File

@ -104,7 +104,7 @@ public class HeadlessInput
/**
* Create an instance, reading from the given buffer.
*
* @param a_stram a stream from where the data will be read.
* @param a_stream a stream from where the data will be read.
* @param inheritSettings a stream from that endian and other settings are
* inherited.
*/
@ -151,7 +151,7 @@ public class HeadlessInput
else
{
subsequentCalls = true;
Serializable value = (Serializable) Vio.readValue(this, NONE, null,
Serializable value = Vio.readValue(this, NONE, null,
null, repository_id, null, null);
return value;
}
@ -167,7 +167,7 @@ public class HeadlessInput
else
{
subsequentCalls = true;
value = (Serializable) Vio.readValue(this, NONE, value, null, null,
value = Vio.readValue(this, NONE, value, null, null,
null, null);
return value;
}
@ -186,7 +186,7 @@ public class HeadlessInput
{
subsequentCalls = true;
Serializable value = (Serializable) Vio.instantiateAnyWay(clz);
value = (Serializable) Vio.readValue(this, NONE, value, null, null,
value = Vio.readValue(this, NONE, value, null, null,
null, null);
return value;
}

View File

@ -38,7 +38,6 @@ exception statement from your version. */
package gnu.CORBA.CDR;
import java.io.DataInput;
import java.io.EOFException;
import java.io.FilterInputStream;
import java.io.IOException;

View File

@ -637,7 +637,7 @@ public abstract class Vio
r = new byte[chunk_size + 256];
n = 0;
reading: while (n < chunk_size)
while (n < chunk_size)
n += input.read(r, n, chunk_size - n);
output.write(r, 0, n);
}

View File

@ -167,7 +167,7 @@ public class gnuRuntime
* @param a_id a repository Id, if only one Id was specified in the stream.
* @param a_ids a repository Ids, if the multiple Ids were specified in te
* stream.
* @param a_codabase a codebase, if it was specified in the stream.
* @param a_codebase a codebase, if it was specified in the stream.
*/
public gnuRuntime(String a_codebase, Object a_target)
{

View File

@ -44,10 +44,6 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import org.omg.CORBA.LocalObject;
import org.omg.CORBA.portable.Delegate;
import org.omg.CORBA.portable.ObjectImpl;
/**
* This class provides support for the direct method invocations without
* involving the network in the case when both ORBs run on the same java

View File

@ -109,7 +109,7 @@ public class Connected_objects
/**
* Get the record of the stored object.
*
* @param object the stored object
* @param stored_object the stored object
*
* @return the record about the stored object, null if
* this object is not stored here.
@ -141,7 +141,7 @@ public class Connected_objects
* generated automatically.
*
* @param object the object to add.
* @param port, on that the ORB will be listening to the remote
* @param port on that the ORB will be listening to the remote
* invocations.
*
* @return the newly created object record.

View File

@ -38,8 +38,6 @@ exception statement from your version. */
package gnu.CORBA.DynAn;
import gnu.CORBA.TypeKindNamer;
import org.omg.CORBA.Any;
import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.ORB;

View File

@ -46,7 +46,6 @@ import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.ORB;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.portable.Streamable;
import org.omg.DynamicAny.DynAny;
import org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode;

View File

@ -271,7 +271,6 @@ public class gnuDynUnion
// Get the discriminator variant.
Variants:
for (int i = 0; i < final_type.member_count(); i++)
{
if (final_type.member_label(i).equal(da))
@ -392,7 +391,6 @@ public class gnuDynUnion
// Get the discriminator variant.
Variants:
for (int i = 0; i < final_type.member_count(); i++)
{
if (final_type.member_label(i).equal(da))

View File

@ -39,10 +39,8 @@ exception statement from your version. */
package gnu.CORBA;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.NO_IMPLEMENT;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.UNKNOWN;
import org.omg.CORBA.UnknownUserException;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;

View File

@ -55,16 +55,16 @@ public abstract class CancelHeader
public int request_id;
/**
* Write the header.
* Read the header.
*
* @param out a stream to write to.
* @param input a stream to read from.
*/
public abstract void read(InputStream input);
/**
* Write the header.
*
* @param out a stream to write to.
* @param output a stream to write to.
*/
public abstract void write(OutputStream output);
}

View File

@ -41,8 +41,6 @@ package gnu.CORBA.GIOP;
import gnu.CORBA.CDR.AbstractCdrInput;
import gnu.CORBA.CDR.AbstractCdrOutput;
import gnu.CORBA.IOR;
import gnu.CORBA.IOR.CodeSets_profile;
import java.io.IOException;
/**

View File

@ -398,7 +398,7 @@ public class MessageHeader
if (service != null)
service.setSoTimeout(to_read);
reading: while (n < r.length)
while (n < r.length)
{
n += source.read(r, n, r.length - n);
}
@ -426,7 +426,7 @@ public class MessageHeader
int dn;
n = 0;
reading: while (n < h2.message_size)
while (n < h2.message_size)
{
dn = source.read(r, 0, h2.message_size - n);

View File

@ -51,9 +51,9 @@ public class CancelHeader
extends gnu.CORBA.GIOP.CancelHeader
{
/**
* Write the header.
* Read the header.
*
* @param out a stream to write to.
* @param input a stream to read from.
*/
public void read(InputStream input)
{
@ -63,7 +63,7 @@ public class CancelHeader
/**
* Write the header.
*
* @param out a stream to write to.
* @param output a stream to write to.
*/
public void write(OutputStream output)
{

View File

@ -385,7 +385,7 @@ public class IOR
/**
* 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
*

View File

@ -42,7 +42,6 @@ import org.omg.CORBA.OBJ_ADAPTER;
import org.omg.CORBA.OMGVMCID;
import org.omg.PortableInterceptor.IORInfo;
import org.omg.PortableInterceptor.IORInterceptor;
import org.omg.PortableInterceptor.IORInterceptorOperations;
import org.omg.PortableInterceptor.IORInterceptor_3_0Operations;
import org.omg.PortableInterceptor.ObjectReferenceTemplate;

View File

@ -142,7 +142,7 @@ public class Registrator extends LocalObject implements ORBInitInfo
* Create the interceptor collection from the given properties, using the
* agreed naming convention.
*
* @param orb the ORB being initialised.
* @param an_orb the ORB being initialised.
* @param props the cumulated set of properties where the orb initializer
* pattern is searched.
* @param an_args the argument string array, passed to ORB.init.

View File

@ -58,8 +58,6 @@ import org.omg.PortableInterceptor.ForwardRequest;
import java.io.IOException;
import java.net.Socket;
/**
* The Classpath implementation of the {@link Delegate} functionality in the
* case, when the object was constructed from an IOR object. The IOR can be
@ -87,8 +85,6 @@ public class IorDelegate extends SimpleDelegate
* @param operation the method name
* @param parameters the method parameters
* @param returns the return value holder
* @param exceptions the exceptions that can be thrown by the method
* @param ctx_list the context list (null allowed)
*
* @return the created request.
*/
@ -175,7 +171,7 @@ public class IorDelegate extends SimpleDelegate
throws ApplicationException, RemarshalException
{
StreamBasedRequest request = (StreamBasedRequest) output;
Forwardings: while (true)
while (true)
{
try
{

View File

@ -62,7 +62,6 @@ import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.StringTokenizer;
/**

View File

@ -63,7 +63,7 @@ public class NameTransformer
* representation. See {@link #toString(NameComponent)} for the
* description of this format.
*
* @param name the string form of the name.
* @param a_name the string form of the name.
*
* @return the array form of the name.
*

View File

@ -111,7 +111,7 @@ public class ObjectCreator
* 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
* @param idl name
* @return instantiated object instance or null if no such available.
*/
public static java.lang.Object createObject(String idl, String suffix)

View File

@ -185,7 +185,7 @@ public class OrbFocused
p = (portServer) portServers.get(i);
if (p.s_port == port)
{
return (portServer) p;
return p;
}
}
// The server is not yet instantiated. Instantiate.

View File

@ -855,7 +855,7 @@ public class OrbFunctional extends OrbRestricted
* internet address and port. With this information, the object can be found
* by another ORB, possibly located on remote computer.
*
* @param the CORBA object
* @param forObject CORBA object
* @return the object IOR representation.
*
* @throws BAD_PARAM if the object has not been previously connected to this
@ -1040,7 +1040,7 @@ public class OrbFunctional extends OrbRestricted
* computer, possibly running a different (not necessary java) CORBA
* implementation.
*
* @param ior the object IOR representation string.
* @param an_ior the object IOR representation string.
*
* @return the found CORBA object.
* @see object_to_string(org.omg.CORBA.Object)

View File

@ -65,7 +65,6 @@ 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.IORInterceptor_3_0Operations;
import org.omg.PortableInterceptor.ServerRequestInterceptorOperations;

View File

@ -163,7 +163,7 @@ public class AOM
* Get the record of the stored object. If the object is mapped several times
* under the different keys, one of the mappings is used.
*
* @param object the stored object
* @param stored_object the stored object
*
* @return the record about the stored object, null if this object is not
* stored here.

View File

@ -421,7 +421,7 @@ public class gnuPOA
* or adding the returned instance to any possible table.
*
* @param child_name the name of the poa being created.
* @param manager the poa manager (never null).
* @param a_manager the poa manager (never null).
* @param policies the array of policies.
* @param an_orb the ORB for this POA.
*
@ -1239,7 +1239,7 @@ public class gnuPOA
* @param x the aom entry, where the object is replaced by value, returned by
* servant activator (if not null).
*
* @param key the object key.
* @param object_key the object key.
*
* @param a_servant the servant that was passed as a parameter in the
* activation method.
@ -1317,7 +1317,7 @@ public class gnuPOA
/**
* Set the adapter activator for this POA.
*
* @param the activator being set.
* @param an_activator the activator being set.
*/
public void the_activator(AdapterActivator an_activator)
{

View File

@ -41,7 +41,6 @@ package gnu.CORBA.Poa;
import org.omg.CORBA.BAD_INV_ORDER;
import org.omg.CORBA.LocalObject;
import org.omg.PortableInterceptor.NON_EXISTENT;
import org.omg.PortableInterceptor.ObjectReferenceTemplate;
import org.omg.PortableServer.POAManager;
import org.omg.PortableServer.POAManagerPackage.AdapterInactive;
import org.omg.PortableServer.POAManagerPackage.State;
@ -89,9 +88,9 @@ public class gnuPOAManager
* Turns the associated POAs into active state, allowing them to receive
* and process requests.
*
* @throws if the POAs are in the inactive state. If once inactivated,
* the POA cannot be activated again. This method can only be called
* to leave the holding or discarding state.
* @throws AdapterInactive if the POAs are in the inactive state.
* If once inactivated, the POA cannot be activated again. This
* method can only be called to leave the holding or discarding state.
*/
public void activate()
throws AdapterInactive

View File

@ -785,7 +785,7 @@ public class gnuServantObject extends ObjectImpl
* assumed equal if they are connected to the same orb and poa under the same
* Id, regardless of they delegates.
*
* @param another instance to check.
* @param other instance to check.
* @return
*/
public boolean _is_equivalent(org.omg.CORBA.Object other)

View File

@ -41,7 +41,6 @@ package gnu.CORBA;
import gnu.CORBA.CDR.BufferedCdrOutput;
import org.omg.CORBA.ARG_IN;
import org.omg.CORBA.ARG_INOUT;
import org.omg.CORBA.ARG_OUT;
import org.omg.CORBA.Any;
import org.omg.CORBA.Bounds;

View File

@ -38,8 +38,6 @@ exception statement from your version. */
package gnu.CORBA;
import java.util.ArrayList;
import org.omg.CORBA.Bounds;
import org.omg.CORBA.ContextList;

View File

@ -38,8 +38,6 @@ exception statement from your version. */
package gnu.CORBA;
import java.util.ArrayList;
import org.omg.CORBA.Bounds;
import org.omg.CORBA.ExceptionList;
import org.omg.CORBA.TypeCode;

View File

@ -83,12 +83,10 @@ import org.omg.PortableInterceptor.ClientRequestInterceptorOperations;
import org.omg.PortableInterceptor.ForwardRequest;
import org.omg.PortableInterceptor.InvalidSlot;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.BindException;
import java.net.Socket;
import java.util.ArrayList;

View File

@ -109,7 +109,7 @@ public class FixedTypeCode
/**
* Get the number of digits in thid BigDecimal
*
* @param x a BigDecimal to check.
* @param number a BigDecimal to check.
*/
public static int countDigits(BigDecimal number)
{

View File

@ -63,7 +63,7 @@ public class RecursiveTypeCode
* Create a typecode that serves as a placeholder for
* the typecode with the given id.
*
* @param id the Id of the type for that this type serves as a
* @param an_id the Id of the type for that this type serves as a
* placeholder.
*/
public RecursiveTypeCode(String an_id)

View File

@ -48,6 +48,7 @@ import java.security.PrivilegedActionException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.ServiceConfigurationError;
import java.util.logging.Level;
@ -222,8 +223,8 @@ public final class ServiceFactory
* @throws IllegalArgumentException if <code>spi</code> is
* <code>null</code>.
*/
public static Iterator lookupProviders(Class spi,
ClassLoader loader)
public static <P> Iterator<P> lookupProviders(Class<P> spi,
ClassLoader loader)
{
return lookupProviders(spi, loader, false);
}
@ -266,12 +267,12 @@ public final class ServiceFactory
* @throws IllegalArgumentException if <code>spi</code> is
* <code>null</code>.
*/
public static Iterator lookupProviders(Class spi,
ClassLoader loader,
boolean error)
public static <P> Iterator<P> lookupProviders(Class<P> spi,
ClassLoader loader,
boolean error)
{
String resourceName;
Enumeration urls;
Enumeration<URL> urls;
if (spi == null)
throw new IllegalArgumentException();
@ -295,11 +296,14 @@ public final class ServiceFactory
throw new ServiceConfigurationError("Failed to access + " +
resourceName, ioex);
else
return Collections.EMPTY_LIST.iterator();
{
List<P> empty = Collections.emptyList();
return empty.iterator();
}
}
return new ServiceIterator(spi, urls, loader, error,
AccessController.getContext());
return new ServiceIterator<P>(spi, urls, loader, error,
AccessController.getContext());
}
@ -318,7 +322,7 @@ public final class ServiceFactory
*
* @see #lookupProviders(Class, ClassLoader)
*/
public static Iterator lookupProviders(Class spi)
public static <P> Iterator<P> lookupProviders(Class<P> spi)
{
ClassLoader ctxLoader;
@ -335,14 +339,14 @@ public final class ServiceFactory
*
* @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
*/
private static final class ServiceIterator
implements Iterator
private static final class ServiceIterator<P>
implements Iterator<P>
{
/**
* The service provider interface (usually an interface, sometimes
* an abstract class) which the services must implement.
*/
private final Class spi;
private final Class<P> spi;
/**
@ -350,7 +354,7 @@ public final class ServiceFactory
* <code>META-INF/services/&lt;org.foo.SomeService&gt;</code>,
* as returned by {@link ClassLoader#getResources(String)}.
*/
private final Enumeration urls;
private final Enumeration<URL> urls;
/**
@ -389,7 +393,7 @@ public final class ServiceFactory
* {@link #next()}, or <code>null</code> if the iterator has
* already returned all service providers.
*/
private Object nextProvider;
private P nextProvider;
/**
* True if a {@link ServiceConfigurationError} should be thrown
@ -420,7 +424,7 @@ public final class ServiceFactory
* @param securityContext the security context to use when loading
* and initializing service providers.
*/
ServiceIterator(Class spi, Enumeration urls, ClassLoader loader,
ServiceIterator(Class<P> spi, Enumeration<URL> urls, ClassLoader loader,
boolean error, AccessControlContext securityContext)
{
this.spi = spi;
@ -436,9 +440,9 @@ public final class ServiceFactory
* @throws NoSuchElementException if {@link #hasNext} returns
* <code>false</code>.
*/
public Object next()
public P next()
{
Object result;
P result;
if (!hasNext())
throw new NoSuchElementException();
@ -461,7 +465,7 @@ public final class ServiceFactory
}
private Object loadNextServiceProvider()
private P loadNextServiceProvider()
{
String line;
@ -523,7 +527,7 @@ public final class ServiceFactory
* active when calling lookupProviders.
*/
return AccessController.doPrivileged(
new ServiceProviderLoadingAction(spi, line, loader),
new ServiceProviderLoadingAction<P>(spi, line, loader),
securityContext);
}
catch (Exception ex)
@ -577,7 +581,7 @@ public final class ServiceFactory
if (!urls.hasMoreElements())
return;
currentURL = (URL) urls.nextElement();
currentURL = urls.nextElement();
try
{
reader = new BufferedReader(new InputStreamReader(

View File

@ -54,15 +54,15 @@ import java.security.PrivilegedExceptionAction;
*
* @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
*/
final class ServiceProviderLoadingAction
implements PrivilegedExceptionAction
final class ServiceProviderLoadingAction<P>
implements PrivilegedExceptionAction<P>
{
/**
* The interface to which the loaded service provider implementation
* must conform. Usually, this is a Java interface type, but it
* might also be an abstract class or even a concrete class.
*/
private final Class spi;
private final Class<P> spi;
/**
@ -97,7 +97,7 @@ final class ServiceProviderLoadingAction
* <code>providerName</code> or <code>loader</code> is
* <code>null</code>.
*/
ServiceProviderLoadingAction(Class spi, String providerName,
ServiceProviderLoadingAction(Class<P> spi, String providerName,
ClassLoader loader)
{
if (spi == null || providerName == null || loader == null)
@ -130,13 +130,13 @@ final class ServiceProviderLoadingAction
* no-argument constructor; or if there some other problem with
* creating a new instance of the service provider.
*/
public Object run()
public P run()
throws Exception
{
Class loadedClass;
Object serviceProvider;
Class<P> loadedClass;
P serviceProvider;
loadedClass = loader.loadClass(providerName);
loadedClass = (Class<P>) loader.loadClass(providerName);
serviceProvider = loadedClass.newInstance();
// Ensure that the loaded provider is actually implementing

View File

@ -117,9 +117,9 @@ public class ExceptionEvent
return _exception.getClass();
else if (type == EVENT_EXCEPTION_CAUGHT)
if (_catchLocation.getMethod() != null)
return new Boolean(true);
return Boolean.TRUE;
else
return new Boolean(false);
return Boolean.FALSE;
return null;
}

View File

@ -39,7 +39,6 @@ exception statement from your version. */
package gnu.classpath.jdwp.event.filters;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.event.Event;
import gnu.classpath.jdwp.exception.InvalidThreadException;
import gnu.classpath.jdwp.id.ThreadId;

View File

@ -56,7 +56,6 @@ import gnu.classpath.jdwp.value.ValueFactory;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
/**

View File

@ -46,7 +46,6 @@ 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.ClassReferenceTypeId;
import gnu.classpath.jdwp.id.ObjectId;
import gnu.classpath.jdwp.id.ReferenceTypeId;
import gnu.classpath.jdwp.util.JdwpString;

View File

@ -0,0 +1,59 @@
/* DefaultDaemonThreadFactory.java -- Factory for Deamon Threads.
Copyright (C) 2007 Free Software Foundation, Inc.
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.toolkit;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;;
/**
* Create a new thread using all the default settings as returned by
* <code>Executors.defaultThreadFactory()</code> plus calling
* <code>thread.setDaemon(true)</code> on the newly created thread.
*
* @author Mario Torre <neugens@limasoftware.net>
*/
public class DefaultDaemonThreadFactory implements ThreadFactory
{
public Thread newThread(Runnable r)
{
Thread thread = Executors.defaultThreadFactory().newThread(r);
thread.setDaemon(true);
return thread;
}
}

View File

@ -126,7 +126,7 @@ public class AWTUtilities
*
* @return the next visible <code>Component</code> in the List
*
* @throws if there is no next element
* @throws NoSuchElementException if there is no next element
*/
public Object next()
{

View File

@ -51,7 +51,6 @@ import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
import java.awt.Toolkit;
import java.awt.font.TextAttribute;
import java.awt.peer.DesktopPeer;
import java.awt.peer.RobotPeer;
import java.io.IOException;

View File

@ -43,7 +43,6 @@ import gnu.java.security.action.SetAccessibleAction;
import java.awt.Component;
import java.awt.Frame;
import java.awt.Toolkit;
import java.lang.reflect.Field;
import java.security.AccessController;

View File

@ -37,6 +37,8 @@ exception statement from your version. */
package gnu.java.awt.font;
import gnu.java.awt.java2d.ShapeWrapper;
import java.awt.Font;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphMetrics;
@ -82,6 +84,10 @@ public class GNUGlyphVector
private AffineTransform[] transforms;
private int layoutFlags;
/**
* The cached non-transformed outline of this glyph vector.
*/
private Shape cleanOutline;
/**
* Constructs a new GNUGlyphVector.
@ -257,7 +263,6 @@ public class GNUGlyphVector
*/
public Shape getOutline()
{
validate();
return getOutline(0.0f, 0.0f);
}
@ -273,16 +278,33 @@ public class GNUGlyphVector
{
validate();
GeneralPath outline = new GeneralPath();
int len = glyphs.length;
for (int i = 0; i < len; i++)
Shape outline;
if (cleanOutline == null)
{
GeneralPath p = new GeneralPath(getGlyphOutline(i));
outline.append(p, false);
GeneralPath path = new GeneralPath();
int len = glyphs.length;
for (int i = 0; i < len; i++)
{
GeneralPath p = new GeneralPath(getGlyphOutline(i));
path.append(p, false);
}
// Protect the cached instance from beeing modified by application
// code.
cleanOutline = new ShapeWrapper(path);
outline = cleanOutline;
}
else
{
outline = cleanOutline;
}
if (x != 0 || y != 0)
{
GeneralPath path = new GeneralPath(outline);
AffineTransform t = new AffineTransform();
t.translate(x, y);
path.transform(t);
outline = path;
}
AffineTransform t = new AffineTransform();
t.translate(x, y);
outline.transform(t);
return outline;
}

View File

@ -35,7 +35,7 @@ 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.java.awt.peer.x;
package gnu.java.awt.font;
import java.awt.Font;
import java.awt.FontMetrics;
@ -54,15 +54,16 @@ import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import gnu.java.awt.font.FontDelegate;
import gnu.java.awt.font.FontFactory;
import gnu.java.awt.peer.ClasspathFontPeer;
public class XFontPeer2
public class OpenTypeFontPeer
extends ClasspathFontPeer
{
@ -70,10 +71,21 @@ public class XFontPeer2
* The font mapping as specified in the file fonts.properties.
*/
private static Properties fontProperties;
/**
* The available font family names.
*/
private static Set<String> availableFontNames;
/**
* Font spec to file mapping.
*/
private static Map<String,Map<String,String>> fontToFileMap;
static
{
fontProperties = new Properties();
InputStream in = XFontPeer2.class.getResourceAsStream("fonts.properties");
InputStream in = OpenTypeFontPeer.class.getResourceAsStream("fonts.properties");
try
{
fontProperties.load(in);
@ -234,12 +246,14 @@ public class XFontPeer2
private FontDelegate fontDelegate;
XFontPeer2(String name, int style, int size)
public OpenTypeFontPeer(String name, int style, int size)
{
super(name, style, size);
try
{
File fontfile = new File("/usr/share/fonts/truetype/freefont/FreeSans.ttf");
String fontSpec = encodeFont(name, style);
String filename = mapFontToFilename(fontSpec);
File fontfile = new File(filename);
FileInputStream in = new FileInputStream(fontfile);
FileChannel ch = in.getChannel();
ByteBuffer buffer = ch.map(FileChannel.MapMode.READ_ONLY, 0,
@ -252,12 +266,14 @@ public class XFontPeer2
}
}
XFontPeer2(String name, Map atts)
public OpenTypeFontPeer(String name, Map atts)
{
super(name, atts);
try
{
File fontfile = new File("/usr/share/fonts/truetype/freefont/FreeSans.ttf");
String fontSpec = encodeFont(name, atts);
String filename = mapFontToFilename(fontSpec);
File fontfile = new File(filename);
FileInputStream in = new FileInputStream(fontfile);
FileChannel ch = in.getChannel();
ByteBuffer buffer = ch.map(FileChannel.MapMode.READ_ONLY, 0,
@ -371,7 +387,7 @@ public class XFontPeer2
*
* @return the encoded font description
*/
static String encodeFont(String name, Map atts)
public static String encodeFont(String name, Map atts)
{
String family = name;
if (family == null || family.equals(""))
@ -379,11 +395,6 @@ public class XFontPeer2
if (family == null)
family = "SansSerif";
int size = 12;
Float sizeFl = (Float) atts.get(TextAttribute.SIZE);
if (sizeFl != null)
size = sizeFl.intValue();
int style = 0;
// Detect italic attribute.
Float posture = (Float) atts.get(TextAttribute.POSTURE);
@ -395,49 +406,43 @@ public class XFontPeer2
if (weight != null && weight.compareTo(TextAttribute.WEIGHT_REGULAR) > 0)
style |= Font.BOLD;
return encodeFont(name, style, size);
return encodeFont(name, style);
}
/**
* Encodes a font name + style + size specification into a X logical font
* description (XLFD) as described here:
*
* http://www.meretrx.com/e93/docs/xlfd.html
* Encodes a font name + style into a combined string.
*
* This is implemented to look up the font description in the
* fonts.properties of this package.
*
* @param name the font name
* @param style the font style
* @param size the font size
*
* @return the encoded font description
*/
static String encodeFont(String name, int style, int size)
static String encodeFont(String name, int style)
{
StringBuilder key = new StringBuilder();
key.append(validName(name));
key.append('.');
key.append('/');
switch (style)
{
case Font.BOLD:
key.append("bold");
key.append("b");
break;
case Font.ITALIC:
key.append("italic");
key.append("i");
break;
case (Font.BOLD | Font.ITALIC):
key.append("bolditalic");
key.append("bi");
break;
case Font.PLAIN:
default:
key.append("plain");
key.append("p");
}
String protoType = fontProperties.getProperty(key.toString());
int s = size;
return protoType.replaceFirst("%d", String.valueOf(s * 10));
return key.toString();
}
/**
@ -451,18 +456,108 @@ public class XFontPeer2
static String validName(String name)
{
String retVal;
if (name.equalsIgnoreCase("sansserif")
|| name.equalsIgnoreCase("serif")
|| name.equalsIgnoreCase("monospaced")
|| name.equalsIgnoreCase("dialog")
|| name.equalsIgnoreCase("dialoginput"))
Set<String> fontNames = getFontNames();
if (fontNames.contains(name))
{
retVal = name.toLowerCase();
retVal = name;
}
else
{
retVal = "sansserif";
retVal = "SansSerif";
}
return retVal;
}
public static String[] getAvailableFontFamilyNames(Locale l)
{
Set<String> fontNames = getFontNames();
int numNames = fontNames.size();
String[] ret = fontNames.toArray(new String[numNames]);
return ret;
}
private static synchronized Set<String> getFontNames()
{
if (availableFontNames == null)
{
HashSet<String> familyNames = new HashSet<String>();
for (Object o : fontProperties.keySet())
{
if (o instanceof String)
{
String key = (String) o;
int slashIndex = key.indexOf('/');
String name = key.substring(0, slashIndex);
familyNames.add(name);
}
}
availableFontNames = familyNames;
}
return availableFontNames;
}
/**
* Takes a font spec as returned by {@link #encodeFont(String, int)},
* and returns the corresponding font file, or <code>null</code> if no such
* font mapping exists.
*
* @param fontSpec font name and style as returned by
* {@link #encodeFont(String, int)}
*
* @return filename of the corresponding font file
*/
private synchronized String mapFontToFilename(String fontSpec)
{
if (fontToFileMap == null)
{
fontToFileMap = new HashMap<String,Map<String,String>>();
// Initialize font spec to file mapping according to the
// font.properties.
for (Object o : fontProperties.keySet())
{
if (o instanceof String)
{
String key = (String) o;
int slashIndex = key.indexOf('/');
String name = key.substring(0, slashIndex);
String spec = key.substring(slashIndex + 1);
// Handle aliases in the 2nd pass below.
if (! spec.equals("a"))
{
Map<String,String> specToFileMap = fontToFileMap.get(name);
if (specToFileMap == null)
{
specToFileMap = new HashMap<String,String>();
fontToFileMap.put(name, specToFileMap);
}
specToFileMap.put(spec, fontProperties.getProperty(key));
}
}
}
// 2nd pass for handling aliases.
for (Object o : fontProperties.keySet())
{
if (o instanceof String)
{
String key = (String) o;
int slashIndex = key.indexOf('/');
String name = key.substring(0, slashIndex);
String spec = key.substring(slashIndex + 1);
// Handle aliases in the 2nd pass below.
if (spec.equals("a"))
{
String alias = fontProperties.getProperty(key);
Map<String,String> specToFileMap = fontToFileMap.get(alias);
fontToFileMap.put(name, specToFileMap);
}
}
}
}
// Look up font file.
int slashIndex = fontSpec.indexOf('/');
String name = fontSpec.substring(0, slashIndex);
String spec = fontSpec.substring(slashIndex + 1);
return fontToFileMap.get(name).get(spec);
}
}

View File

@ -0,0 +1,300 @@
/* AsyncImage.java -- Loads images asynchronously
Copyright (C) 2008 Free Software Foundation, Inc.
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.java.awt.image;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.ImageConsumer;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.util.HashSet;
import java.util.Iterator;
/**
* Supports asynchronous loading of images.
*/
public class AsyncImage
extends Image
{
/**
* The image source for AsyncImages.
*/
private class AsyncImageSource
implements ImageProducer
{
/**
* The real image source, if already present, or <code>null</code>
* otherwise.
*/
private ImageProducer realSource;
public void addConsumer(ImageConsumer ic)
{
startProduction(ic);
}
public boolean isConsumer(ImageConsumer ic)
{
return false;
}
public void removeConsumer(ImageConsumer ic)
{
// Nothing to do here.
}
public void requestTopDownLeftRightResend(ImageConsumer ic)
{
startProduction(ic);
}
public void startProduction(ImageConsumer ic)
{
ImageProducer ip = getRealSource();
if (ip == null)
{
ic.setDimensions(1, 1);
ic.imageComplete(ImageConsumer.SINGLEFRAMEDONE);
}
else
{
ip.startProduction(ic);
}
}
/**
* Returns the real image source, if already present. Otherwise, this
* returns <code>null</code>.
*
* @return the real image source, or <code>null</code> if not present
*/
private ImageProducer getRealSource()
{
synchronized (AsyncImage.this)
{
ImageProducer source = realSource;
if (source == null)
{
Image ri = realImage;
if (ri != null)
{
realSource = source = ri.getSource();
}
}
return source;
}
}
}
/**
* The real image. This is null as long as the image is not complete.
*/
private volatile Image realImage;
/**
* The image observers.
*
* This is package private to avoid accessor methods.
*/
HashSet<ImageObserver> observers;
private volatile boolean complete = false;
/**
* Creates a new AsyncImage.
*/
AsyncImage()
{
observers = new HashSet<ImageObserver>();
}
public void flush()
{
// Nothing to do here.
}
public Graphics getGraphics()
{
Image r = realImage;
Graphics g = null;
if (r != null)
g = r.getGraphics(); // Should we return some dummy graphics instead?
return g;
}
public boolean isComplete() {
return complete;
}
public int getHeight(ImageObserver observer)
{
addObserver(observer);
int height = -1;
waitForImage(observer);
Image r = realImage;
if (r != null)
height = r.getHeight(observer);
return height;
}
public Object getProperty(String name, ImageObserver observer)
{
addObserver(observer);
Image r = realImage;
Object prop = null;
if (r != null)
prop = r.getProperty(name, observer);
return prop;
}
public ImageProducer getSource()
{
return new AsyncImageSource();
}
public int getWidth(ImageObserver observer)
{
addObserver(observer);
int width = -1;
waitForImage(observer);
Image r = realImage;
if (r != null)
width = r.getWidth(observer);
return width;
}
public void addObserver(ImageObserver obs)
{
if (obs != null)
{
synchronized (this)
{
// This field gets null when image loading is complete and we don't
// need to store any more observers.
HashSet<ImageObserver> observs = observers;
if (observs != null)
{
observs.add(obs);
}
}
}
}
public boolean prepareImage(int w, int h, ImageObserver obs)
{
addObserver(obs);
return realImage != null;
}
public int checkImage(int w, int h, ImageObserver obs)
{
addObserver(obs);
int flags = 0;
if (realImage != null)
flags = ImageObserver.ALLBITS | ImageObserver.WIDTH
| ImageObserver.HEIGHT | ImageObserver.PROPERTIES;
return flags;
}
public Image getRealImage()
{
return realImage;
}
public void setRealImage(Image im)
{
realImage = im;
int status = ImageObserver.HEIGHT | ImageObserver.WIDTH;
notifyObservers(status, 0, 0, im.getWidth(null), im.getHeight(null));
}
public void notifyObservers(int status, int x, int y, int w, int h)
{
synchronized (this)
{
HashSet observs = observers;
if (observs != null)
{
Iterator i = observs.iterator();
while (i.hasNext())
{
ImageObserver obs = (ImageObserver) i.next();
boolean complete = obs.imageUpdate(this, status, x, y, realImage.getWidth(obs), realImage.getHeight(obs));
if (complete) // Remove completed observers.
i.remove();
}
}
if ((status & ImageObserver.ALLBITS) != 0)
{
complete = true;
notifyAll();
}
}
}
/**
* Waits for the image to be loaded completely, if the image observer
* is <code>null</code>. Otherwise this is not necessary, because the
* image observer can be notified about later completion.
*
* @param observer the image observer
*/
public void waitForImage(ImageObserver observer)
{
if (!complete && observer == null)
{
synchronized (this)
{
while (! complete)
{
try
{
wait();
}
catch (InterruptedException ex)
{
Thread.currentThread().interrupt();
}
}
}
}
}
}

View File

@ -0,0 +1,528 @@
/* ImageConverter.java -- Loads images asynchronously
Copyright (C) 2008 Free Software Foundation, Inc.
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.java.awt.image;
import gnu.java.awt.image.AsyncImage;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.Transparency;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.DataBuffer;
import java.awt.image.ImageConsumer;
import java.awt.image.IndexColorModel;
import java.awt.image.ImageObserver;
import java.awt.image.SinglePixelPackedSampleModel;
import java.awt.image.WritableRaster;
import java.util.Hashtable;
/**
* Convert an Image to a BufferedImage.
*
* @author Roman Kennke (kennke@aicas.com)
*/
public class ImageConverter implements ImageConsumer
{
public static final String IMAGE_TRANSPARENCY_PROPERTY =
"gnu.awt.image.transparency";
public static final String IMAGE_PROPERTIES_PROPERTY =
"gnu.awt.image.properties";
private AsyncImage image;
private BufferedImage bImage;
private Hashtable imageProperties;
private int width, height;
private ColorModel colorModel;
private ColorModel targetColorModel;
public ImageConverter()
{
width = 0;
height = 0;
image = new AsyncImage();
}
public void setDimensions(int w, int h)
{
width = w;
height = h;
}
public void setProperties(Hashtable props)
{
// Ignore for now.
}
public void setColorModel(ColorModel model)
{
colorModel = model;
}
public void setHints(int flags)
{
// Ignore for now.
}
public void setPixels(int x, int y, int w, int h, ColorModel model,
byte[] pixels, int offset, int scansize)
{
model = setupColorModel(model);
if (bImage == null)
{
createImage();
}
Integer t = (Integer) imageProperties.get("gnu.awt.image.transparency");
int transparency = t.intValue();
if(targetColorModel.equals(model))
{
transparency = transferPixels(x, y, w, h, model, pixels, offset,
scansize, transparency);
}
else if (model instanceof IndexColorModel
&& targetColorModel.equals(ColorModel.getRGBdefault()))
{
transparency = convertIndexColorModelToSRGB(x, y, w, h,
(IndexColorModel) model,
pixels, offset, scansize,
transparency);
}
else
{
transparency = convertPixels(x, y, w, h, model, pixels, offset,
scansize, transparency);
}
imageProperties.put("gnu.awt.image.transparency",
Integer.valueOf(transparency));
}
public void setPixels(int x, int y, int w, int h, ColorModel model,
int[] pixels, int offset, int scansize)
{
model = setupColorModel(model);
if (bImage == null)
{
createImage();
}
Integer t = (Integer) imageProperties.get(IMAGE_TRANSPARENCY_PROPERTY);
int transparency= t.intValue();
if (targetColorModel.equals(model))
{
transparency = transferPixels(x, y, w, h, model, pixels, offset,
scansize, transparency);
}
else if (model instanceof IndexColorModel
&& targetColorModel.equals(ColorModel.getRGBdefault()))
{
transparency = convertIndexColorModelToSRGB(x, y, w, h,
(IndexColorModel) model,
pixels, offset, scansize,
transparency);
}
else
{
transparency = convertPixels(x, y, w, h, model, pixels, offset,
scansize, transparency);
}
imageProperties.put(IMAGE_TRANSPARENCY_PROPERTY,
Integer.valueOf(transparency));
}
/**
* Initialize the color model for this setPixels run: <br/>
* 1. if no color model was given use the hinted color model <br/>
* 2. if no color model was given and non was hinted use the default sRGB color model. <br/>
* Also:<br/>
* If no target color model was set use the color model of the given pixels.
* @param model
* @return
*/
private ColorModel setupColorModel(ColorModel model)
{
// If the given color model is null use the previously hinted color model.
if (model == null)
model = colorModel;
// If no color model was given or hinted use default sRGB.
if (model == null)
model = ColorModel.getRGBdefault();
// If no specific color model was requested for the target use the current
// pixels model.
if (targetColorModel == null)
targetColorModel = model;
targetColorModel = ColorModel.getRGBdefault();
return model;
}
/**
* Creates the image instance into which the pixel data is converted.
*/
private void createImage()
{
if (imageProperties == null)
{
imageProperties = new Hashtable();
}
imageProperties.put(IMAGE_TRANSPARENCY_PROPERTY,
Integer.valueOf(Transparency.OPAQUE));
imageProperties.put(IMAGE_PROPERTIES_PROPERTY, imageProperties);
// For the sRGB case let the GraphicsEnvironment create an image for us.
if (ColorModel.getRGBdefault().equals(targetColorModel))
{
bImage = GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice()
.getDefaultConfiguration()
.createCompatibleImage(width, height, Transparency.TRANSLUCENT);
}
else
{
WritableRaster raster =
targetColorModel.createCompatibleWritableRaster(width, height);
bImage = new BufferedImage(targetColorModel, raster, false,
imageProperties);
}
image.setRealImage(bImage);
return;
}
/**
* Transfers pixels into a raster of the same color model.
*
* @param x the X coordinate of the source pixel rectangle
* @param y the Y coordinate of the source pixel rectangle
* @param w the width of the source pixel rectangle
* @param h the height of the source pixel rectangle
* @param model the color model of the source pixels
* @param pixels the pixel data
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
*
* @return the determined transparency
*/
private int transferPixels(int x, int y, int w, int h, ColorModel model,
byte[] pixels, int offset, int scansize,
int transparency)
{
// If we have the same color model, then we can simply drop
// the pixel value into the target raster.
bImage.getRaster().setDataElements(x, y, w, h, pixels);
for (int yy = 0; yy < h; yy++)
{
for (int xx = 0; xx < w; xx++)
{
int pixel = 0xFF & pixels[yy * scansize + xx + offset];
int alpha = model.getAlpha(pixel);
transparency = updateTransparency(alpha, transparency);
}
}
return transparency;
}
/**
* Transfers pixels into a raster of the same color model.
*
* @param x the X coordinate of the source pixel rectangle
* @param y the Y coordinate of the source pixel rectangle
* @param w the width of the source pixel rectangle
* @param h the height of the source pixel rectangle
* @param model the color model of the source pixels
* @param pixels the pixel data
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
*
* @return the determined transparency
*/
private int transferPixels(int x, int y, int w, int h, ColorModel model,
int[] pixels, int offset, int scansize,
int transparency)
{
// If we have the same color model, then we can simply drop
// the pixel value into the target raster.
bImage.getRaster().setDataElements(x, y, w, h, pixels);
for (int yy = 0; yy < h; yy++)
{
for (int xx = 0; xx < w; xx++)
{
int pixel = pixels[yy * scansize + xx + offset];
int alpha = model.getAlpha(pixel);
transparency = updateTransparency(alpha, transparency);
}
}
return transparency;
}
/**
* Converts pixel from one color model to another, and stores them in the
* target image.
*
* @param x the X coordinate of the source pixel rectangle
* @param y the Y coordinate of the source pixel rectangle
* @param w the width of the source pixel rectangle
* @param h the height of the source pixel rectangle
* @param model the color model of the source pixels
* @param pixels the pixel data
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
*
* @return the determined transparency
*/
private int convertPixels(int x, int y, int w, int h, ColorModel model,
byte[] pixels, int offset, int scansize,
int transparency)
{
// If the color models are not the same, we must convert the
// pixel values from one model to the other.
Object dataEl = null;
// Convert pixels to the destination color model.
for (int yy = 0; yy < h; yy++)
{
for (int xx = 0; xx < w; xx++)
{
int pixel = 0xFF & pixels[yy * scansize + xx + offset];
int rgb = model.getRGB(pixel);
int alpha = model.getAlpha(pixel);
transparency = updateTransparency(alpha, transparency);
dataEl = targetColorModel.getDataElements(rgb, dataEl);
bImage.getRaster().setDataElements(x + xx, y + yy, dataEl);
}
}
return transparency;
}
/**
* Converts pixel from one color model to another, and stores them in the
* target image.
*
* @param x the X coordinate of the source pixel rectangle
* @param y the Y coordinate of the source pixel rectangle
* @param w the width of the source pixel rectangle
* @param h the height of the source pixel rectangle
* @param model the color model of the source pixels
* @param pixels the pixel data
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
*
* @return the determined transparency
*/
private int convertPixels(int x, int y, int w, int h, ColorModel model,
int[] pixels, int offset, int scansize,
int transparency)
{
// If the color models are not the same, we must convert the
// pixel values from one model to the other.
Object dataEl = null;
// Convert pixels to the destination color model.
for (int yy = 0; yy < h; yy++)
{
for (int xx = 0; xx < w; xx++)
{
int pixel = pixels[yy * scansize + xx + offset];
int rgb = model.getRGB(pixel);
int alpha = model.getAlpha(pixel);
transparency = updateTransparency(alpha, transparency);
dataEl = targetColorModel.getDataElements(rgb, dataEl);
bImage.getRaster().setDataElements(x + xx, y + yy, dataEl);
}
}
return transparency;
}
/**
* Converts pixels from an index color model to the target image.
*
* @param x the X coordinate of the source pixel rectangle
* @param y the Y coordinate of the source pixel rectangle
* @param w the width of the source pixel rectangle
* @param h the height of the source pixel rectangle
* @param model the color model of the source pixels
* @param pixels the pixel data
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
*
* @return the determined transparency
*/
private int convertIndexColorModelToSRGB(int x, int y, int w, int h,
IndexColorModel model,
byte[] pixels, int offset,
int scansize, int transparency)
{
int mapSize = model.getMapSize();
int[] colorMap = new int[mapSize];
for(int i=0; i < mapSize; i++)
{
colorMap[i] = model.getRGB(i);
}
WritableRaster raster = bImage.getRaster();
SinglePixelPackedSampleModel sampleMode =
(SinglePixelPackedSampleModel) raster.getSampleModel();
DataBuffer dataBuffer = (DataBuffer) raster.getDataBuffer();
int rasterOffset = sampleMode.getOffset(x,y)+dataBuffer.getOffset();
int rasterScanline = sampleMode.getScanlineStride();
for (int yy = 0; yy < h; yy++)
{
int xoffset = offset;
for (int xx = 0; xx < w; xx++)
{
int argb = colorMap[(pixels[xoffset++] & 0xFF)];
dataBuffer.setElem(rasterOffset+xx, argb);
int alpha = (argb >>> 24);
transparency = updateTransparency(alpha, transparency);
}
offset += scansize;
rasterOffset += rasterScanline;
}
return transparency;
}
/**
* Converts pixels from an index color model to the target image.
*
* @param x the X coordinate of the source pixel rectangle
* @param y the Y coordinate of the source pixel rectangle
* @param w the width of the source pixel rectangle
* @param h the height of the source pixel rectangle
* @param model the color model of the source pixels
* @param pixels the pixel data
* @param offset the offset in the pixel array
* @param scansize the scanline size
* @param transparency the assumed transparency
*
* @return the determined transparency
*/
private int convertIndexColorModelToSRGB(int x, int y, int w, int h,
IndexColorModel model, int[] pixels,
int offset, int scansize,
int transparency)
{
int mapSize = model.getMapSize();
int[] colorMap = new int[mapSize];
for(int i=0; i < mapSize; i++)
{
colorMap[i] = model.getRGB(i);
}
WritableRaster raster = bImage.getRaster();
SinglePixelPackedSampleModel sampleMode =
(SinglePixelPackedSampleModel) raster.getSampleModel();
DataBuffer dataBuffer = (DataBuffer)raster.getDataBuffer();
int rasterOffset = sampleMode.getOffset(x, y) + dataBuffer.getOffset();
int rasterScanline = sampleMode.getScanlineStride();
for (int yy = 0; yy < h; yy++)
{
int xoffset = offset;
for (int xx = 0; xx < w; xx++)
{
int argb = colorMap[pixels[xoffset++]];
dataBuffer.setElem(rasterOffset + xx, argb);
int alpha = (argb >>> 24);
transparency = updateTransparency(alpha, transparency);
}
offset += scansize;
rasterOffset += rasterScanline;
}
return transparency;
}
/**
* Updates the transparency information according to the alpha pixel value.
*
* @param alpha the alpha pixel value
* @param transparency the old transparency
*
* @return the updated transparency
*/
private int updateTransparency(int alpha, int transparency)
{
if (alpha != 0xFF)
{
if (alpha == 0x00 && transparency <= Transparency.BITMASK)
{
transparency = Transparency.BITMASK;
}
else if (transparency < Transparency.TRANSLUCENT)
{
transparency = Transparency.TRANSLUCENT;
}
}
return transparency;
}
public void imageComplete(int status)
{
image.notifyObservers(ImageObserver.ALLBITS, 0, 0, width, height);
}
public void setTargetColorModel(ColorModel model)
{
targetColorModel = model;
}
public Image getImage()
{
return image;
}
}

View File

@ -37,6 +37,8 @@ exception statement from your version. */
package gnu.java.awt.java2d;
import gnu.java.util.LRUCache;
import java.awt.AWTError;
import java.awt.AlphaComposite;
import java.awt.AWTPermission;
@ -80,7 +82,9 @@ import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
import java.awt.image.renderable.RenderableImage;
import java.text.AttributedCharacterIterator;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
/**
@ -151,23 +155,47 @@ public abstract class AbstractGraphics2D
implements Cloneable, Pixelizer
{
/**
* Wether we use anti aliasing for rendering text by default or not.
*/
private static final boolean DEFAULT_TEXT_AA =
Boolean.getBoolean("gnu.java2d.default_text_aa");
/**
* The default font to use on the graphics object.
*/
private static final Font FONT = new Font("SansSerif", Font.PLAIN, 12);
/**
* The size of the LRU cache used for caching GlyphVectors.
*/
private static final int GV_CACHE_SIZE = 50;
/**
* Caches certain shapes to avoid massive creation of such Shapes in
* the various draw* and fill* methods.
*/
private static final ThreadLocal<ShapeCache> shapeCache =
new ThreadLocal<ShapeCache>();
private static final ShapeCache shapeCache = new ShapeCache();
/**
* The scanline converters by thread.
* A pool of scanline converters. It is important to reuse scanline
* converters because they keep their datastructures in place. We pool them
* for use in multiple threads.
*/
private static final ThreadLocal<ScanlineConverter> scanlineConverters =
new ThreadLocal<ScanlineConverter>();
private static final LinkedList<ScanlineConverter> scanlineConverters =
new LinkedList<ScanlineConverter>();
/**
* Caches glyph vectors for better drawing performance.
*/
private static final Map<TextCacheKey,GlyphVector> gvCache =
Collections.synchronizedMap(new LRUCache<TextCacheKey,GlyphVector>(GV_CACHE_SIZE));
/**
* This key is used to search in the gvCache without allocating a new
* key each time.
*/
private static final TextCacheKey searchTextKey = new TextCacheKey();
/**
* The transformation for this Graphics2D instance
@ -484,14 +512,25 @@ public abstract class AbstractGraphics2D
*/
public void drawString(String text, int x, int y)
{
if (isOptimized)
rawDrawString(text, x, y);
else
GlyphVector gv;
synchronized (searchTextKey)
{
FontRenderContext ctx = getFontRenderContext();
GlyphVector gv = font.createGlyphVector(ctx, text.toCharArray());
drawGlyphVector(gv, x, y);
TextCacheKey tck = searchTextKey;
FontRenderContext frc = getFontRenderContext();
tck.setString(text);
tck.setFont(font);
tck.setFontRenderContext(frc);
if (gvCache.containsKey(tck))
{
gv = gvCache.get(tck);
}
else
{
gv = font.createGlyphVector(frc, text.toCharArray());
gvCache.put(new TextCacheKey(text, font, frc), gv);
}
}
drawGlyphVector(gv, x, y);
}
/**
@ -949,7 +988,10 @@ public abstract class AbstractGraphics2D
public FontRenderContext getFontRenderContext()
{
return new FontRenderContext(transform, false, true);
// Protect our own transform from beeing modified.
AffineTransform tf = new AffineTransform(transform);
// TODO: Determine antialias and fractionalmetrics parameters correctly.
return new FontRenderContext(tf, false, true);
}
/**
@ -992,8 +1034,10 @@ public abstract class AbstractGraphics2D
// Copy the clip. If it's a Rectangle, preserve that for optimization.
if (clip instanceof Rectangle)
copy.clip = new Rectangle((Rectangle) clip);
else
else if (clip != null)
copy.clip = new GeneralPath(clip);
else
copy.clip = null;
copy.renderingHints = new RenderingHints(null);
copy.renderingHints.putAll(renderingHints);
@ -1163,7 +1207,7 @@ public abstract class AbstractGraphics2D
}
else
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.line == null)
sc.line = new Line2D.Float();
sc.line.setLine(x1, y1, x2, y2);
@ -1175,11 +1219,13 @@ public abstract class AbstractGraphics2D
{
if (isOptimized)
{
rawDrawRect(x, y, w, h);
int tx = (int) transform.getTranslateX();
int ty = (int) transform.getTranslateY();
rawDrawRect(x + tx, y + ty, w, h);
}
else
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.rect == null)
sc.rect = new Rectangle();
sc.rect.setBounds(x, y, w, h);
@ -1204,7 +1250,7 @@ public abstract class AbstractGraphics2D
}
else
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.rect == null)
sc.rect = new Rectangle();
sc.rect.setBounds(x, y, width, height);
@ -1249,7 +1295,7 @@ public abstract class AbstractGraphics2D
public void drawRoundRect(int x, int y, int width, int height, int arcWidth,
int arcHeight)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.roundRect == null)
sc.roundRect = new RoundRectangle2D.Float();
sc.roundRect.setRoundRect(x, y, width, height, arcWidth, arcHeight);
@ -1269,7 +1315,7 @@ public abstract class AbstractGraphics2D
public void fillRoundRect(int x, int y, int width, int height, int arcWidth,
int arcHeight)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.roundRect == null)
sc.roundRect = new RoundRectangle2D.Float();
sc.roundRect.setRoundRect(x, y, width, height, arcWidth, arcHeight);
@ -1286,7 +1332,7 @@ public abstract class AbstractGraphics2D
*/
public void drawOval(int x, int y, int width, int height)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.ellipse == null)
sc.ellipse = new Ellipse2D.Float();
sc.ellipse.setFrame(x, y, width, height);
@ -1303,7 +1349,7 @@ public abstract class AbstractGraphics2D
*/
public void fillOval(int x, int y, int width, int height)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.ellipse == null)
sc.ellipse = new Ellipse2D.Float();
sc.ellipse.setFrame(x, y, width, height);
@ -1316,7 +1362,7 @@ public abstract class AbstractGraphics2D
public void drawArc(int x, int y, int width, int height, int arcStart,
int arcAngle)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.arc == null)
sc.arc = new Arc2D.Float();
sc.arc.setArc(x, y, width, height, arcStart, arcAngle, Arc2D.OPEN);
@ -1329,7 +1375,7 @@ public abstract class AbstractGraphics2D
public void fillArc(int x, int y, int width, int height, int arcStart,
int arcAngle)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.arc == null)
sc.arc = new Arc2D.Float();
sc.arc.setArc(x, y, width, height, arcStart, arcAngle, Arc2D.PIE);
@ -1338,7 +1384,7 @@ public abstract class AbstractGraphics2D
public void drawPolyline(int[] xPoints, int[] yPoints, int npoints)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.polyline == null)
sc.polyline = new GeneralPath();
GeneralPath p = sc.polyline;
@ -1355,7 +1401,7 @@ public abstract class AbstractGraphics2D
*/
public void drawPolygon(int[] xPoints, int[] yPoints, int npoints)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.polygon == null)
sc.polygon = new Polygon();
sc.polygon.reset();
@ -1370,7 +1416,7 @@ public abstract class AbstractGraphics2D
*/
public void fillPolygon(int[] xPoints, int[] yPoints, int npoints)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.polygon == null)
sc.polygon = new Polygon();
sc.polygon.reset();
@ -1559,8 +1605,9 @@ public abstract class AbstractGraphics2D
{
Object v = renderingHints.get(RenderingHints.KEY_TEXT_ANTIALIASING);
// We default to antialiasing for text rendering.
antialias = (v == RenderingHints.VALUE_TEXT_ANTIALIAS_ON
|| v == RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
antialias = v == RenderingHints.VALUE_TEXT_ANTIALIAS_ON
|| (v == RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT
&& DEFAULT_TEXT_AA);
}
else
{
@ -1569,12 +1616,15 @@ public abstract class AbstractGraphics2D
}
ScanlineConverter sc = getScanlineConverter();
int resolution = 0;
int yRes = 0;
if (antialias)
{
// Adjust resolution according to rendering hints.
resolution = 2;
yRes = 4;
}
sc.renderShape(this, s, clip, transform, resolution, renderingHints);
sc.renderShape(this, s, clip, transform, resolution, yRes, renderingHints);
freeScanlineConverter(sc);
}
/**
@ -1606,7 +1656,7 @@ public abstract class AbstractGraphics2D
*/
protected void rawDrawLine(int x0, int y0, int x1, int y1)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.line == null)
sc.line = new Line2D.Float();
sc.line.setLine(x0, y0, x1, y1);
@ -1615,29 +1665,13 @@ public abstract class AbstractGraphics2D
protected void rawDrawRect(int x, int y, int w, int h)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.rect == null)
sc.rect = new Rectangle();
sc.rect.setBounds(x, y, w, h);
draw(sc.rect);
}
/**
* Draws a string in optimization mode. The implementation should respect the
* clip and translation. It can assume that the clip is a rectangle and that
* the transform is only a translating transform.
*
* @param text the string to be drawn
* @param x the start of the baseline, X coordinate
* @param y the start of the baseline, Y coordinate
*/
protected void rawDrawString(String text, int x, int y)
{
FontRenderContext ctx = getFontRenderContext();
GlyphVector gv = font.createGlyphVector(ctx, text.toCharArray());
drawGlyphVector(gv, x, y);
}
/**
* Clears a rectangle in optimization mode. The implementation should respect the
* clip and translation. It can assume that the clip is a rectangle and that
@ -1667,7 +1701,7 @@ public abstract class AbstractGraphics2D
*/
protected void rawFillRect(int x, int y, int w, int h)
{
ShapeCache sc = getShapeCache();
ShapeCache sc = shapeCache;
if (sc.rect == null)
sc.rect = new Rectangle();
sc.rect.setBounds(x, y, w, h);
@ -1918,35 +1952,38 @@ public abstract class AbstractGraphics2D
}
/**
* Returns the ShapeCache for the calling thread.
* Returns a free scanline converter from the pool.
*
* @return the ShapeCache for the calling thread
*/
private ShapeCache getShapeCache()
{
ShapeCache sc = shapeCache.get();
if (sc == null)
{
sc = new ShapeCache();
shapeCache.set(sc);
}
return sc;
}
/**
* Returns the scanline converter for this thread.
*
* @return the scanline converter for this thread
* @return a scanline converter
*/
private ScanlineConverter getScanlineConverter()
{
ScanlineConverter sc = scanlineConverters.get();
if (sc == null)
synchronized (scanlineConverters)
{
sc = new ScanlineConverter();
scanlineConverters.set(sc);
ScanlineConverter sc;
if (scanlineConverters.size() > 0)
{
sc = scanlineConverters.removeFirst();
}
else
{
sc = new ScanlineConverter();
}
return sc;
}
}
/**
* Puts a scanline converter back in the pool.
*
* @param sc
*/
private void freeScanlineConverter(ScanlineConverter sc)
{
synchronized (scanlineConverters)
{
scanlineConverters.addLast(sc);
}
return sc;
}
}

View File

@ -0,0 +1,132 @@
package gnu.java.awt.java2d;
/**
* Stores and handles the pixel converage for a scanline. The pixel coverage
* is stored as sorted list of buckets, each of which holds information about
* the coverage for the X and Y axis. This is utilized to compute the actual
* coverage for each pixel on the scanline and finding chunks of pixels with
* equal coverage.
*/
final class PixelCoverage
{
/**
* One bucket in the list.
*/
private static final class Bucket
{
/**
* The X coordinate on the scanline to which this bucket belongs.
*/
int xPos;
/**
* The X coverage.
*/
int xCov;
/**
* The Y coverage.
*/
int yCov;
/**
* Implements a linked list. This points to the next element of the list.
*/
Bucket next;
/**
* Implements a linked list. This points to the previous element of the
* list.
*/
Bucket prev;
}
/**
* The head of the sorted list of buckets.
*/
private Bucket head;
/**
* The current bucket. We make use of the fact that the scanline converter
* always scans the scanline (and thus this list) from left to right to
* quickly find buckets or insertion points.
*/
private Bucket current;
/**
* The bucket after the last valid bucket. Unused buckets are not thrown
* away and garbage collected. Instead, we keep them at the tail of the list
* and reuse them when necessary.
*/
private Bucket last;
/**
* Indicates the the next scan of the scanline begins and that the next
* request will be at the beginning of this list. This makes searching and
* sorting of this list very quick.
*/
void rewind()
{
current = head;
}
/**
* Clears the list. This does not throw away the old buckets but only
* resets the end-pointer of the list to the first element. All buckets are
* then unused and are reused when the list is filled again.
*/
void clear()
{
last = head;
}
/**
* This adds the specified x and y coverage to the pixel at the specified
* X position.
*
* @param x the X position
* @param xc the x coverage
* @param yc the y coverage
*/
void add(int x, int xc, int yc)
{
Bucket bucket = findOrInsert(x);
bucket.xCov += xc;
bucket.yCov += yc;
}
/**
* Finds the bucket in the list with the specified X coordinate.
* If no such bucket is found, then a new one is fetched (either a cached
* bucket from the end of the list or a newly allocated one) inserted at the
* correct position and returned.
*
* @param x the X coordinate
*
* @return a bucket to hold the coverage data
*/
private Bucket findOrInsert(int x)
{
// First search for a matching bucket.
if (head == null)
{
// Special case: the list is still empty.
head = new Bucket();
current = head;
return head;
}
// This performs a linear search, starting from the current bucket.
// This is reasonably efficient because access to this list is always done
// in a linear fashion and we are not more then 1 or 2 buckets away from
// the one we're looking for.
Bucket match = current;
while (match != null && match.xPos != x)
{
}
return match;
}
}

View File

@ -61,11 +61,6 @@ public final class ScanlineConverter
*/
private static int ONE = Fixed.fixedValue(FIXED_DIGITS, 1);
/**
* The number of significant bits for the Y resolution.
*/
private static int Y_RESOLUTION = 4;
/**
* The actual number of scanlines.
*/
@ -93,6 +88,11 @@ public final class ScanlineConverter
*/
private int resolution;
/**
* The number of significant bits for the 'Y' resolution.
*/
private int yResolution;
/**
* One half step according to the resolution. This is stored to avoid
* unnecessary operations during rendering.
@ -145,14 +145,15 @@ public final class ScanlineConverter
* @param trans the transform
*/
public void renderShape(Pixelizer p, Shape shape, Shape clip,
AffineTransform trans, int res, RenderingHints hints)
AffineTransform trans, int res, int yRes,
RenderingHints hints)
{
// TODO: Do something useful with the rendering hints. Like, adjusting
// the resolution.
// Prepare resolution and upper bounds.
clear();
setResolution(res);
setResolution(res, yRes);
boolean haveClip = clip != null;
@ -278,10 +279,10 @@ public final class ScanlineConverter
int frac0 = ONE - Fixed.trunc(FIXED_DIGITS, x0);
int frac1 = ONE - Fixed.trunc(FIXED_DIGITS, x1);
// Only keep the first 4 digits after the point.
frac0 = frac0 >> (FIXED_DIGITS - Y_RESOLUTION);
frac1 = frac1 >> (FIXED_DIGITS - Y_RESOLUTION);
scanlineCoverage.add(pix0, 1 * (1 << Y_RESOLUTION), frac0);
scanlineCoverage.add(pix1, -1 * (1 << Y_RESOLUTION), -frac1);
frac0 = frac0 >> (FIXED_DIGITS - yResolution);
frac1 = frac1 >> (FIXED_DIGITS - yResolution);
scanlineCoverage.add(pix0, 1 * (1 << yResolution), frac0);
scanlineCoverage.add(pix1, -1 * (1 << yResolution), -frac1);
}
if (edge.isClip)
inClip = ! inClip;
@ -306,14 +307,16 @@ public final class ScanlineConverter
*
* @param res the resolution
*/
private void setResolution(int res)
private void setResolution(int res, int yRes)
{
int scanlinesPerPixel = 1 << res;
int one = Fixed.fixedValue(FIXED_DIGITS, 1);
resolution = one / (scanlinesPerPixel);
halfStep = resolution / 2;
scanlineCoverage.setMaxCoverage(scanlinesPerPixel << Y_RESOLUTION);
scanlineCoverage.setMaxCoverage(scanlinesPerPixel << yResolution);
yResolution = yRes;
}
/**

View File

@ -157,7 +157,7 @@ public final class ScanlineCoverage
* A data object that carries information about pixel coverage on a scanline.
* The data consists of a starting X position on the scanline, the
* length of the range in pixels and the actual coverage value.
´ */
**/
public static final class Range
{
/**

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