libjava/classpath/ChangeLog.gcj:

2007-05-31  Matthias Klose  <doko@ubuntu.com>

        * javax/management/NotificationBroadcasterSupport.java
        (getNotificationInfo): Add cast.
        * native/jni/qt-peer/Makefile.am (AM_CXXFLAGS): Add libstdc++ include
        directories.
        * native/jni/qt-peer/Makefile.in: Regenerate.

libjava/ChangeLog:

2007-06-03  Matthias Klose  <doko@ubuntu.com>

        * java/io/natFileWin32.cc (setFilePermissions): New (stub only).
        _access: Handle EXEC query, stub only.

2007-06-03  Matthias Klose  <doko@ubuntu.com>

        Merged from classpath:
        * gnu/java/nio/SelectorProviderImpl.java: Whitespace merge.
        * java/lang/System.java(inheritedChannel): New.
        * java/lang/Character.java: Remove stray`;'.
        * java/net/MulticastSocket.java: Merged.
        * java/text/DateFormatSymbols.java(getInstance): New, comment updates.
        * java/text/Collator.java(getInstance): Merged.
        * java/util/Calendar.java: New attributes ALL_STYLES, SHORT, LONG.
        getDisplayName, getDisplayNames: New.
        * java/util/logging/Logger.java: Merged.
        * Regenerate .class and .h files.

2007-06-03  Matthias Klose  <doko@ubuntu.com>

        * java/io/File.java: Merge with classpath-0.95, new method
        setFilePermissions, new attribute EXEC.
        * java/io/natFilePosix.cc (setFilePermissions): New.
        _access: Handle EXEC query.
        * classpath/lib/java/io/File.class, java/io/File.h: Regenerate.

2007-06-03  Matthias Klose  <doko@ubuntu.com>

        Imported GNU Classpath 0.95.

        * classpath/Makefile.in,
        classpath/native/jni/midi-dssi/Makefile.in,
        classpath/native/jni/classpath/Makefile.in,
        classpath/native/jni/Makefile.in,
        classpath/native/jni/gconf-peer/Makefile.in,
        classpath/native/jni/java-io/Makefile.in,
        classpath/native/jni/native-lib/Makefile.in,
        classpath/native/jni/java-util/Makefile.in,
        classpath/native/jni/midi-alsa/Makefile.in,
        classpath/native/jni/java-lang/Makefile.in,
        classpath/native/jni/java-nio/Makefile.in,
        classpath/native/jni/java-net/Makefile.in,
        classpath/native/jni/xmlj/Makefile.in,
        classpath/native/jni/qt-peer/Makefile.in,
        classpath/native/jni/gtk-peer/Makefile.in,
        classpath/native/Makefile.in, classpath/native/jawt/Makefile.in,
        classpath/native/fdlibm/Makefile.in,
        classpath/native/plugin/Makefile.in,
        classpath/resource/Makefile.in, classpath/scripts/Makefile.in,
        classpath/tools/Makefile.in, classpath/doc/Makefile.in,
        classpath/doc/api/Makefile.in, classpath/lib/Makefile.in,
        classpath/external/Makefile.in, classpath/external/jsr166/Makefile.in,
        classpath/external/sax/Makefile.in,
        classpath/external/w3c_dom/Makefile.in,
        classpath/external/relaxngDatatype/Makefile.in,
        classpath/include/Makefile.in,
        classpath/examples/Makefile.in: Regenerate.
        * classpath/config.guess, classpath/config.sub,
        classpath/ltmain.sh : Update.
        * classpath/configure, classpath/depcomp, classpath/missing,
        classpath/aclocal.m4, classpath/install-sh: Regenerate.

        * gnu/classpath/Configuration.java (CLASSPATH_VERSION): Now 0.95.
        * sources.am: Regenerate.
        * Makefile.in: Regenerate.

        * Update the .class files and generated CNI header files, add new
        .class and generated CNI header files.
        * Remove generated files for removed java source files:
        classpath/gnu/java/net/BASE64.java,
        classpath/gnu/java/security/util/Base64.java,
        classpath/gnu/java/awt/peer/gtk/GThreadMutex.java,
        classpath/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java,
        classpath/gnu/java/awt/font/autofit/Scaler.java,
        classpath/gnu/classpath/jdwp/util/Value.java,
        classpath/gnu/javax/net/ssl/Base64.java.
        * Remove empty directories.

        * Makefile.am(nat_source_files): Add natVMOperatingSystemMXBeanImpl.cc.
        * java/lang/Class.java(setAccessible): Merge from classpath.
        * java/util/Locale.java: Remove.
        * gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java,
        gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc: New.
        * gcj/javaprims.h: Update class declarations.
        * scripts/classes.pl: Update usage.
        * HACKING: Mention to build all peers.

From-SVN: r125302
This commit is contained in:
Matthias Klose 2007-06-03 23:18:43 +00:00
parent af333b9a7f
commit e1bea0c068
2951 changed files with 80982 additions and 68583 deletions

View file

@ -38,9 +38,6 @@ class java::awt::Canvas : public ::java::awt::Component
public:
Canvas();
Canvas(::java::awt::GraphicsConfiguration *);
public: // actually package-private
virtual ::java::awt::GraphicsConfiguration * getGraphicsConfigurationImpl();
public:
virtual void addNotify();
virtual void paint(::java::awt::Graphics *);
virtual ::javax::accessibility::AccessibleContext * getAccessibleContext();
@ -55,8 +52,7 @@ private:
static const jlong serialVersionUID = -2284879212465893870LL;
static jlong next_canvas_number;
public: // actually package-private
::java::awt::GraphicsConfiguration * __attribute__((aligned(__alignof__( ::java::awt::Component)))) graphicsConfiguration;
::java::awt::image::BufferStrategy * bufferStrategy;
::java::awt::image::BufferStrategy * __attribute__((aligned(__alignof__( ::java::awt::Component)))) bufferStrategy;
public:
static ::java::lang::Class class$;
};

View file

@ -350,7 +350,6 @@ public:
public: // actually package-private
virtual ::java::lang::String * generateName();
virtual void setPeer(::java::awt::peer::ComponentPeer *);
virtual ::java::awt::GraphicsConfiguration * getGraphicsConfigurationImpl();
static ::java::awt::Event * translateEvent(::java::awt::AWTEvent *);
virtual void dispatchEventImpl(::java::awt::AWTEvent *);
virtual jboolean eventTypeEnabled(jint);

View file

@ -0,0 +1,41 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_awt_Desktop$Action__
#define __java_awt_Desktop$Action__
#pragma interface
#include <java/lang/Enum.h>
#include <gcj/array.h>
extern "Java"
{
namespace java
{
namespace awt
{
class Desktop$Action;
}
}
}
class java::awt::Desktop$Action : public ::java::lang::Enum
{
Desktop$Action(::java::lang::String *, jint);
public:
static JArray< ::java::awt::Desktop$Action * > * values();
static ::java::awt::Desktop$Action * valueOf(::java::lang::String *);
static ::java::awt::Desktop$Action * BROWSE;
static ::java::awt::Desktop$Action * EDIT;
static ::java::awt::Desktop$Action * MAIL;
static ::java::awt::Desktop$Action * OPEN;
static ::java::awt::Desktop$Action * PRINT;
private:
static JArray< ::java::awt::Desktop$Action * > * ENUM$VALUES;
public:
static ::java::lang::Class class$;
};
#endif // __java_awt_Desktop$Action__

View file

@ -0,0 +1,52 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_awt_Desktop__
#define __java_awt_Desktop__
#pragma interface
#include <java/lang/Object.h>
extern "Java"
{
namespace java
{
namespace awt
{
class Desktop;
class Desktop$Action;
namespace peer
{
class DesktopPeer;
}
}
namespace net
{
class URI;
}
}
}
class java::awt::Desktop : public ::java::lang::Object
{
Desktop();
public:
static ::java::awt::Desktop * getDesktop();
private:
static jboolean isDesktopSupported();
public:
virtual jboolean isSupported(::java::awt::Desktop$Action *);
virtual void browse(::java::net::URI *);
virtual void edit(::java::io::File *);
virtual void mail();
virtual void mail(::java::net::URI *);
virtual void open(::java::io::File *);
virtual void print(::java::io::File *);
private:
::java::awt::peer::DesktopPeer * __attribute__((aligned(__alignof__( ::java::lang::Object)))) peer;
public:
static ::java::lang::Class class$;
};
#endif // __java_awt_Desktop__

View file

@ -57,6 +57,8 @@ public: // actually protected
virtual ::java::lang::String * paramString();
private:
static void noteFrame(::java::awt::Frame *);
public: // actually package-private
static jboolean hasDisplayableFrames();
public:
static JArray< ::java::awt::Frame * > * getFrames();
virtual void setState(jint);
@ -110,6 +112,7 @@ private:
jboolean undecorated;
static jlong next_frame_number;
static ::java::util::ArrayList * weakFrames;
static ::java::lang::ref::ReferenceQueue * weakFramesQueue;
public:
static ::java::lang::Class class$;
};

View file

@ -43,6 +43,7 @@ public:
virtual ::java::awt::image::VolatileImage * createCompatibleVolatileImage(jint, jint) = 0;
virtual ::java::awt::image::VolatileImage * createCompatibleVolatileImage(jint, jint, ::java::awt::ImageCapabilities *);
virtual ::java::awt::image::VolatileImage * createCompatibleVolatileImage(jint, jint, jint) = 0;
virtual ::java::awt::image::VolatileImage * createCompatibleVolatileImage(jint, jint, ::java::awt::ImageCapabilities *, jint);
virtual ::java::awt::image::BufferedImage * createCompatibleImage(jint, jint, jint) = 0;
virtual ::java::awt::image::ColorModel * getColorModel() = 0;
virtual ::java::awt::image::ColorModel * getColorModel(jint) = 0;

View file

@ -37,6 +37,7 @@ extern "Java"
class Component;
class Container;
class Cursor;
class Desktop;
class Dialog;
class Dimension;
class EventQueue;
@ -101,6 +102,7 @@ extern "Java"
class CheckboxMenuItemPeer;
class CheckboxPeer;
class ChoicePeer;
class DesktopPeer;
class DialogPeer;
class FileDialogPeer;
class FontPeer;
@ -139,6 +141,7 @@ class java::awt::Toolkit : public ::java::lang::Object
public:
Toolkit();
public: // actually protected
virtual ::java::awt::peer::DesktopPeer * createDesktopPeer(::java::awt::Desktop *) = 0;
virtual ::java::awt::peer::ButtonPeer * createButton(::java::awt::Button *) = 0;
virtual ::java::awt::peer::TextFieldPeer * createTextField(::java::awt::TextField *) = 0;
virtual ::java::awt::peer::LabelPeer * createLabel(::java::awt::Label *) = 0;

View file

@ -57,9 +57,6 @@ public:
Window(::java::awt::Frame *);
Window(::java::awt::Window *);
Window(::java::awt::Window *, ::java::awt::GraphicsConfiguration *);
public: // actually package-private
virtual ::java::awt::GraphicsConfiguration * getGraphicsConfigurationImpl();
public:
virtual void addNotify();
virtual void pack();
virtual void show();
@ -133,7 +130,6 @@ private:
::java::awt::event::WindowListener * windowListener;
::java::awt::event::WindowFocusListener * windowFocusListener;
::java::awt::event::WindowStateListener * windowStateListener;
::java::awt::GraphicsConfiguration * graphicsConfiguration;
jboolean shown;
public: // actually package-private
::java::awt::Component * windowFocusOwner;

View file

@ -0,0 +1,38 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_awt_datatransfer_SystemFlavorMap$1__
#define __java_awt_datatransfer_SystemFlavorMap$1__
#pragma interface
#include <java/lang/Object.h>
extern "Java"
{
namespace java
{
namespace awt
{
namespace datatransfer
{
class SystemFlavorMap;
class SystemFlavorMap$1;
}
}
}
}
class java::awt::datatransfer::SystemFlavorMap$1 : public ::java::lang::Object
{
public: // actually package-private
SystemFlavorMap$1(::java::awt::datatransfer::SystemFlavorMap *);
public:
::java::lang::Object * run();
public: // actually package-private
::java::awt::datatransfer::SystemFlavorMap * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$0;
public:
static ::java::lang::Class class$;
};
#endif // __java_awt_datatransfer_SystemFlavorMap$1__

View file

@ -29,6 +29,8 @@ class java::awt::datatransfer::SystemFlavorMap : public ::java::lang::Object
{
SystemFlavorMap();
public: // actually package-private
void setupMapping(::java::util::Properties *);
public:
::java::util::Map * getNativesForFlavors(JArray< ::java::awt::datatransfer::DataFlavor * > *);
::java::util::Map * getFlavorsForNatives(JArray< ::java::lang::String * > *);

View file

@ -44,8 +44,6 @@ public:
virtual jint getPixelStride();
virtual jint getNumDataElements();
virtual ::java::lang::Object * getDataElements(jint, jint, ::java::lang::Object *, ::java::awt::image::DataBuffer *);
virtual ::java::lang::Object * getDataElements(jint, jint, jint, jint, ::java::lang::Object *, ::java::awt::image::DataBuffer *);
virtual void setDataElements(jint, jint, jint, jint, ::java::lang::Object *, ::java::awt::image::DataBuffer *);
virtual JArray< jint > * getPixel(jint, jint, JArray< jint > *, ::java::awt::image::DataBuffer *);
virtual JArray< jint > * getPixels(jint, jint, jint, jint, JArray< jint > *, ::java::awt::image::DataBuffer *);
virtual jint getSample(jint, jint, jint, ::java::awt::image::DataBuffer *);
@ -61,8 +59,6 @@ public: // actually protected
jint numBanks;
jint scanlineStride;
jint pixelStride;
private:
jboolean tightPixelPacking;
public:
static ::java::lang::Class class$;
};

View file

@ -60,6 +60,7 @@ public:
virtual ::java::awt::image::SampleModel * createCompatibleSampleModel(jint, jint);
private:
void setTransparentPixel(jint);
JArray< jint > * createColorMap(jint, jint);
jint __attribute__((aligned(__alignof__( ::java::awt::image::ColorModel)))) map_size;
jboolean opaque;
jint trans;

View file

@ -42,7 +42,6 @@ public:
virtual jint getScanlineStride();
virtual ::java::awt::image::SampleModel * createSubsetSampleModel(JArray< jint > *);
virtual ::java::lang::Object * getDataElements(jint, jint, ::java::lang::Object *, ::java::awt::image::DataBuffer *);
virtual ::java::lang::Object * getDataElements(jint, jint, jint, jint, ::java::lang::Object *, ::java::awt::image::DataBuffer *);
virtual JArray< jint > * getPixel(jint, jint, JArray< jint > *, ::java::awt::image::DataBuffer *);
virtual JArray< jint > * getPixels(jint, jint, jint, jint, JArray< jint > *, ::java::awt::image::DataBuffer *);
virtual jint getSample(jint, jint, jint, ::java::awt::image::DataBuffer *);

View file

@ -0,0 +1,43 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_awt_peer_DesktopPeer__
#define __java_awt_peer_DesktopPeer__
#pragma interface
#include <java/lang/Object.h>
extern "Java"
{
namespace java
{
namespace awt
{
class Desktop$Action;
namespace peer
{
class DesktopPeer;
}
}
namespace net
{
class URI;
}
}
}
class java::awt::peer::DesktopPeer : public ::java::lang::Object
{
public:
virtual void browse(::java::net::URI *) = 0;
virtual void edit(::java::io::File *) = 0;
virtual jboolean isSupported(::java::awt::Desktop$Action *) = 0;
virtual void mail(::java::net::URI *) = 0;
virtual void mail() = 0;
virtual void open(::java::io::File *) = 0;
virtual void print(::java::io::File *) = 0;
static ::java::lang::Class class$;
} __attribute__ ((java_interface));
#endif // __java_awt_peer_DesktopPeer__

View file

@ -29,6 +29,7 @@ extern "Java"
namespace print
{
class PrintService;
class StreamPrintServiceFactory;
namespace attribute
{
class PrintRequestAttributeSet;
@ -63,6 +64,7 @@ public:
virtual void setPrintable(::java::awt::print::Printable *, ::java::awt::print::PageFormat *) = 0;
virtual ::java::awt::print::PageFormat * validatePage(::java::awt::print::PageFormat *) = 0;
static JArray< ::javax::print::PrintService * > * lookupPrintServices();
static JArray< ::javax::print::StreamPrintServiceFactory * > * lookupStreamPrintServices(::java::lang::String *);
virtual ::javax::print::PrintService * getPrintService();
virtual void setPrintService(::javax::print::PrintService *);
private:

View file

@ -0,0 +1,32 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_beans_ConstructorProperties__
#define __java_beans_ConstructorProperties__
#pragma interface
#include <java/lang/Object.h>
#include <gcj/array.h>
extern "Java"
{
namespace java
{
namespace beans
{
class ConstructorProperties;
}
}
}
class java::beans::ConstructorProperties : public ::java::lang::Object
{
public:
virtual JArray< ::java::lang::String * > * value() = 0;
virtual ::java::lang::Class * annotationType() = 0;
static ::java::lang::Class class$;
} __attribute__ ((java_interface));
#endif // __java_beans_ConstructorProperties__

View file

@ -31,6 +31,7 @@ class java::io::File : public ::java::lang::Object
public:
virtual jboolean canRead();
virtual jboolean canWrite();
virtual jboolean canExecute();
private:
jboolean performCreate();
public:
@ -92,6 +93,15 @@ private:
static ::java::lang::String * nextValue();
public:
static ::java::io::File * createTempFile(::java::lang::String *, ::java::lang::String *, ::java::io::File *);
private:
jboolean setFilePermissions(jboolean, jboolean, jint);
public:
virtual jboolean setReadable(jboolean);
virtual jboolean setReadable(jboolean, jboolean);
virtual jboolean setWritable(jboolean);
virtual jboolean setWritable(jboolean, jboolean);
virtual jboolean setExecutable(jboolean);
virtual jboolean setExecutable(jboolean, jboolean);
private:
jboolean performSetReadOnly();
public:
@ -114,6 +124,7 @@ public:
private:
void checkWrite();
void checkRead();
void checkExec();
public:
virtual void deleteOnExit();
private:
@ -123,6 +134,7 @@ private:
static const jint READ = 0;
static const jint WRITE = 1;
static const jint EXISTS = 2;
static const jint EXEC = 3;
static const jint DIRECTORY = 0;
static const jint ISFILE = 1;
static const jint ISHIDDEN = 2;

View file

@ -67,6 +67,7 @@ public class File implements Serializable, Comparable
private final static int READ = 0;
private final static int WRITE = 1;
private final static int EXISTS = 2;
private final static int EXEC = 3;
// QUERY arguments to stat function.
private final static int DIRECTORY = 0;
@ -182,6 +183,27 @@ public class File implements Serializable, Comparable
return _access (WRITE);
}
/**
* This method tests whether or not the current thread is allowed to
* to execute the file pointed to by this object. This will be true if and
* and only if 1) the file exists and 2) the <code>SecurityManager</code>
* (if any) allows access to the file via it's <code>checkExec</code>
* method 3) the file is executable.
*
* @return <code>true</code> if execution is allowed,
* <code>false</code> otherwise
*
* @exception SecurityException If the <code>SecurityManager</code>
* does not allow access to the file
*/
public boolean canExecute()
{
if (!exists())
return false;
checkExec();
return _access (EXEC);
}
private native boolean performCreate() throws IOException;
/**
@ -1138,6 +1160,159 @@ public class File implements Serializable, Comparable
throw new IOException ("cannot create temporary file");
}
/*
* This native method sets file permissions.
*/
private native boolean setFilePermissions(boolean enable, boolean ownerOnly,
int permissions);
/**
* This method sets the owner's read permission for the File represented by
* this object.
*
* It is the same as calling <code>setReadable(readable, true)</code>.
*
* @param <code>readable</code> <code>true</code> to set read permission,
* <code>false</code> to unset the read permission.
* @return <code>true</code> if the file permissions are changed,
* <code>false</code> otherwise.
* @exception SecurityException If write access of the file is not permitted.
* @see #setReadable(boolean, boolean)
* @since 1.6
*/
public boolean setReadable(boolean readable)
{
return setReadable(readable, true);
}
/**
* This method sets the read permissions for the File represented by
* this object.
*
* If <code>ownerOnly</code> is set to <code>true</code> then only the
* read permission bit for the owner of the file is changed.
*
* If <code>ownerOnly</code> is set to <code>false</code>, the file
* permissions are changed so that the file can be read by everyone.
*
* On unix like systems this sets the <code>user</code>, <code>group</code>
* and <code>other</code> read bits and is equal to call
* <code>chmod a+r</code> on the file.
*
* @param <code>readable</code> <code>true</code> to set read permission,
* <code>false</code> to unset the read permission.
* @param <code>ownerOnly</code> <code>true</code> to set read permission
* for owner only, <code>false</code> for all.
* @return <code>true</code> if the file permissions are changed,
* <code>false</code> otherwise.
* @exception SecurityException If write access of the file is not permitted.
* @see #setReadable(boolean)
* @since 1.6
*/
public boolean setReadable(boolean readable, boolean ownerOnly)
{
checkWrite();
return setFilePermissions(readable, ownerOnly, READ);
}
/**
* This method sets the owner's write permission for the File represented by
* this object.
*
* It is the same as calling <code>setWritable(readable, true)</code>.
*
* @param <code>writable</code> <code>true</code> to set write permission,
* <code>false</code> to unset write permission.
* @return <code>true</code> if the file permissions are changed,
* <code>false</code> otherwise.
* @exception SecurityException If write access of the file is not permitted.
* @see #setWritable(boolean, boolean)
* @since 1.6
*/
public boolean setWritable(boolean writable)
{
return setWritable(writable, true);
}
/**
* This method sets the write permissions for the File represented by
* this object.
*
* If <code>ownerOnly</code> is set to <code>true</code> then only the
* write permission bit for the owner of the file is changed.
*
* If <code>ownerOnly</code> is set to <code>false</code>, the file
* permissions are changed so that the file can be written by everyone.
*
* On unix like systems this set the <code>user</code>, <code>group</code>
* and <code>other</code> write bits and is equal to call
* <code>chmod a+w</code> on the file.
*
* @param <code>writable</code> <code>true</code> to set write permission,
* <code>false</code> to unset write permission.
* @param <code>ownerOnly</code> <code>true</code> to set write permission
* for owner only, <code>false</code> for all.
* @return <code>true</code> if the file permissions are changed,
* <code>false</code> otherwise.
* @exception SecurityException If write access of the file is not permitted.
* @see #setWritable(boolean)
* @since 1.6
*/
public boolean setWritable(boolean writable, boolean ownerOnly)
{
checkWrite();
return setFilePermissions(writable, ownerOnly, WRITE);
}
/**
* This method sets the owner's execute permission for the File represented
* by this object.
*
* It is the same as calling <code>setExecutable(readable, true)</code>.
*
* @param <code>executable</code> <code>true</code> to set execute permission,
* <code>false</code> to unset execute permission.
* @return <code>true</code> if the file permissions are changed,
* <code>false</code> otherwise.
* @exception SecurityException If write access of the file is not permitted.
* @see #setExecutable(boolean, boolean)
* @since 1.6
*/
public boolean setExecutable(boolean executable)
{
return setExecutable(executable, true);
}
/**
* This method sets the execute permissions for the File represented by
* this object.
*
* If <code>ownerOnly</code> is set to <code>true</code> then only the
* execute permission bit for the owner of the file is changed.
*
* If <code>ownerOnly</code> is set to <code>false</code>, the file
* permissions are changed so that the file can be executed by everyone.
*
* On unix like systems this set the <code>user</code>, <code>group</code>
* and <code>other</code> write bits and is equal to call
* <code>chmod a+x</code> on the file.
*
* @param <code>executable</code> <code>true</code> to set write permission,
* <code>false</code> to unset write permission.
* @param <code>ownerOnly</code> <code>true</code> to set write permission
* for owner only, <code>false</code> for all.
* @return <code>true</code> if the file permissions are changed,
* <code>false</code> otherwise.
* @exception SecurityException If write access of the file is not permitted.
* @see #setExecutable(boolean)
* @since 1.6
*/
public boolean setExecutable(boolean executable, boolean ownerOnly)
{
checkWrite();
return setFilePermissions(executable, ownerOnly, EXEC);
}
/*
* This native method sets the permissions to make the file read only.
*/
@ -1372,6 +1547,15 @@ public class File implements Serializable, Comparable
s.checkRead(path);
}
private void checkExec()
{
// Check the SecurityManager
SecurityManager s = System.getSecurityManager();
if (s != null)
s.checkExec(path);
}
/**
* Calling this method requests that the file represented by this object
* be deleted when the virtual machine exits. Note that this request cannot

View file

@ -16,8 +16,10 @@ class java::io::ObjectInputStream : public ::java::io::InputStream
public:
ObjectInputStream(::java::io::InputStream *);
virtual ::java::lang::Object * readObject();
virtual ::java::lang::Object * readUnshared();
private:
::java::lang::Object * parseContent(jbyte);
::java::lang::Object * readObject(jboolean);
::java::lang::Object * parseContent(jbyte, jboolean);
void checkTypeConsistency(::java::lang::String *, JArray< ::java::io::ObjectStreamField * > *, JArray< ::java::io::ObjectStreamField * > *);
public: // actually protected
virtual ::java::io::ObjectStreamClass * readClassDescriptor();
@ -60,10 +62,10 @@ public: // actually protected
ObjectInputStream();
virtual ::java::lang::Object * readObjectOverride();
private:
jint assignNewHandle(::java::lang::Object *);
void rememberHandle(::java::lang::Object *, jint);
jint assignNewHandle(::java::lang::Object *, jboolean);
void rememberHandle(::java::lang::Object *, jboolean, jint);
::java::lang::Object * lookupHandle(jint);
::java::lang::Object * processResolution(::java::io::ObjectStreamClass *, ::java::lang::Object *, jint);
::java::lang::Object * processResolution(::java::io::ObjectStreamClass *, ::java::lang::Object *, jint, jboolean);
void clearHandles();
void readNextBlock();
void readNextBlock(jbyte);
@ -86,7 +88,7 @@ private:
jboolean useSubclassMethod;
jint nextOID;
jboolean resolveEnabled;
::java::util::Vector * objectLookupTable;
::java::util::Map * handles;
::java::lang::Object * currentObject;
::java::io::ObjectStreamClass * currentObjectStreamClass;
::java::util::TreeSet * currentObjectValidators;

View file

@ -36,6 +36,9 @@ class java::io::ObjectOutputStream : public ::java::io::OutputStream
public:
ObjectOutputStream(::java::io::OutputStream *);
virtual void writeObject(::java::lang::Object *);
virtual void writeUnshared(::java::lang::Object *);
private:
void writeObject(::java::lang::Object *, jboolean);
public: // actually protected
virtual void writeClassDescriptor(::java::io::ObjectStreamClass *);
public:

View file

@ -43,15 +43,18 @@ java::io::File::_access (jint query)
char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
buf[total] = '\0';
JvAssert (query == READ || query == WRITE || query == EXISTS);
JvAssert (query == READ || query == WRITE || query == EXISTS
|| query == EXEC);
#ifdef HAVE_ACCESS
int mode;
if (query == READ)
mode = R_OK;
else if (query == WRITE)
mode = W_OK;
else
else if (query == EXISTS)
mode = F_OK;
else
mode = X_OK;
return ::access (buf, mode) == 0;
#else
return false;
@ -343,6 +346,54 @@ java::io::File::performMkdir (void)
#endif
}
jboolean
java::io::File::setFilePermissions (jboolean enable,
jboolean ownerOnly,
jint permissions)
{
char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
buf[total] = '\0';
JvAssert (permissions == READ || permissions == WRITE || permissions == EXEC);
#if defined (HAVE_STAT) && defined (HAVE_CHMOD)
mode_t mode = 0;
struct stat sb;
if (::stat (buf, &sb))
return false;
if (ownerOnly)
{
if (permissions == READ)
mode |= S_IRUSR;
else if (permissions == WRITE)
mode |= S_IWUSR;
else if (permissions == EXEC)
mode |= S_IXUSR;
}
else
{
if (permissions == READ)
mode |= (S_IRUSR | S_IRGRP | S_IROTH);
else if (permissions == WRITE)
mode |= (S_IWUSR | S_IWGRP | S_IWOTH);
else if (permissions == EXEC)
mode |= (S_IXUSR | S_IXGRP | S_IXOTH);
}
if (enable)
mode = sb.st_mode | mode;
else
mode = sb.st_mode & ~mode;
if (::chmod(buf, mode) < 0)
return false;
return true;
#else
return false;
#endif
}
jboolean
java::io::File::performSetReadOnly (void)
{

View file

@ -44,13 +44,17 @@ java::io::File::_access (jint query)
if (!canon)
return false;
JvAssert (query == READ || query == WRITE || query == EXISTS);
JvAssert (query == READ || query == WRITE || query == EXISTS
|| query == EXEC);
// FIXME: Is it possible to differentiate between existing and reading?
// If the file exists but cannot be read because of the secuirty attributes
// on an NTFS disk this wont work (it reports it can be read but cant)
// Could we use something from the security API?
DWORD attributes = GetFileAttributes (canon);
// FIXME: handle EXEC
if (query == EXEC)
return false;
if ((query == EXISTS) || (query == READ))
return (attributes == 0xffffffff) ? false : true;
else
@ -211,6 +215,25 @@ java::io::File::performList (java::io::FilenameFilter *filter,
return ret;
}
jboolean
java::io::File::setFilePermissions (jboolean enable,
jboolean ownerOnly,
jint permissions)
{
JV_TEMP_STRING_WIN32 (canon, getCanonicalPath());
if (!canon)
return false;
DWORD attrs = GetFileAttributes (canon);
if (attrs != INVALID_FILE_ATTRIBUTES)
{
// FIXME: implement
return false;
}
else
return false;
}
jboolean
java::io::File::performMkdir (void)
{

View file

@ -163,7 +163,7 @@ public final class Character implements Serializable, Comparable<Character>
private final String canonicalName;
/** Enumeration for the <code>forName()</code> method */
private enum NameType { CANONICAL, NO_SPACES, CONSTANT; };
private enum NameType { CANONICAL, NO_SPACES, CONSTANT; }
/**
* Constructor for strictly defined blocks.

View file

@ -0,0 +1,24 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_lang_Class$1__
#define __java_lang_Class$1__
#pragma interface
#include <java/lang/Object.h>
class java::lang::Class$1 : public ::java::lang::Object
{
public: // actually package-private
Class$1(::java::lang::reflect::AccessibleObject *);
public:
::java::lang::Object * run();
private:
::java::lang::reflect::AccessibleObject * __attribute__((aligned(__alignof__( ::java::lang::Object)))) val$obj;
public:
static ::java::lang::Class class$;
};
#endif // __java_lang_Class$1__

View file

@ -51,6 +51,8 @@ import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
import java.util.ArrayList;
import java.util.Arrays;
@ -60,6 +62,7 @@ import java.util.Collection;
import java.lang.reflect.AnnotatedElement;
import java.lang.annotation.Annotation;
import java.lang.annotation.Inherited;
import java.lang.reflect.AccessibleObject;
/**
* A Class represents a Java type. There will never be multiple Class
@ -1004,7 +1007,9 @@ public final class Class<T>
{
try
{
return (T[]) getMethod("values").invoke(null);
Method m = getMethod("values");
setAccessible(m);
return (T[]) m.invoke(null);
}
catch (NoSuchMethodException exception)
{
@ -1402,4 +1407,19 @@ public final class Class<T>
* @since 1.5
*/
public native boolean isMemberClass();
/**
* Utility method for use by classes in this package.
*/
static void setAccessible(final AccessibleObject obj)
{
AccessController.doPrivileged(new PrivilegedAction()
{
public Object run()
{
obj.setAccessible(true);
return null;
}
});
}
}

View file

@ -25,6 +25,9 @@ public:
virtual ::java::lang::String * name();
virtual jint ordinal();
virtual ::java::lang::Class * getDeclaringClass();
public: // actually protected
virtual void finalize();
public:
virtual jint compareTo(::java::lang::Object *);
private:
static const jlong serialVersionUID = -4300926546619394005LL;

View file

@ -1,23 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_lang_SecurityContext__
#define __java_lang_SecurityContext__
#pragma interface
#include <java/lang/Object.h>
#include <gcj/array.h>
class java::lang::SecurityContext : public ::java::lang::Object
{
public: // actually package-private
SecurityContext(JArray< ::java::lang::Class * > *);
JArray< ::java::lang::Class * > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) classes;
public:
static ::java::lang::Class class$;
};
#endif // __java_lang_SecurityContext__

View file

@ -7,6 +7,19 @@
#pragma interface
#include <java/lang/Object.h>
extern "Java"
{
namespace java
{
namespace nio
{
namespace channels
{
class Channel;
}
}
}
}
class java::lang::System : public ::java::lang::Object
{
@ -44,6 +57,7 @@ private:
public: // actually package-private
static ::java::lang::String * getenv0(::java::lang::String *);
public:
static ::java::nio::channels::Channel * inheritedChannel();
static ::java::io::InputStream * in;
static ::java::io::PrintStream * out;
static ::java::io::PrintStream * err;

View file

@ -46,8 +46,11 @@ import java.io.BufferedOutputStream;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.nio.channels.Channel;
import java.nio.channels.spi.SelectorProvider;
import java.util.AbstractCollection;
import java.util.ArrayList;
import java.util.Collection;
@ -649,6 +652,25 @@ public final class System
*/
static native String getenv0(String name);
/**
* Returns the inherited channel of the VM.
*
* This wraps the inheritedChannel() call of the system's default
* {@link SelectorProvider}.
*
* @return the inherited channel of the VM
*
* @throws IOException If an I/O error occurs
* @throws SecurityException If an installed security manager denies access
* to RuntimePermission("inheritedChannel")
*
* @since 1.5
*/
public static Channel inheritedChannel()
throws IOException
{
return SelectorProvider.provider().inheritedChannel();
}
/**
* This is a specialised <code>Collection</code>, providing

View file

@ -0,0 +1,26 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_lang_management_LockInfo__
#define __java_lang_management_LockInfo__
#pragma interface
#include <java/lang/Object.h>
class java::lang::management::LockInfo : public ::java::lang::Object
{
public:
LockInfo(::java::lang::String *, jint);
virtual ::java::lang::String * getClassName();
virtual jint getIdentityHashCode();
virtual ::java::lang::String * toString();
private:
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) className;
jint identityHashCode;
public:
static ::java::lang::Class class$;
};
#endif // __java_lang_management_LockInfo__

View file

@ -0,0 +1,38 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_lang_management_ManagementFactory$ManagementInvocationHandler__
#define __java_lang_management_ManagementFactory$ManagementInvocationHandler__
#pragma interface
#include <java/lang/Object.h>
#include <gcj/array.h>
extern "Java"
{
namespace javax
{
namespace management
{
class MBeanServerConnection;
class ObjectName;
}
}
}
class java::lang::management::ManagementFactory$ManagementInvocationHandler : public ::java::lang::Object
{
public:
ManagementFactory$ManagementInvocationHandler(::javax::management::MBeanServerConnection *, ::javax::management::ObjectName *);
virtual ::java::lang::Object * invoke(::java::lang::Object *, ::java::lang::reflect::Method *, JArray< ::java::lang::Object * > *);
private:
::java::lang::Object * translate(::java::lang::Object *, ::java::lang::reflect::Method *);
::javax::management::MBeanServerConnection * __attribute__((aligned(__alignof__( ::java::lang::Object)))) conn;
::javax::management::ObjectName * bean;
public:
static ::java::lang::Class class$;
};
#endif // __java_lang_management_ManagementFactory$ManagementInvocationHandler__

View file

@ -14,6 +14,7 @@ extern "Java"
namespace management
{
class MBeanServer;
class MBeanServerConnection;
}
}
}
@ -33,6 +34,7 @@ public:
static ::java::util::List * getMemoryManagerMXBeans();
static ::java::util::List * getGarbageCollectorMXBeans();
static ::javax::management::MBeanServer * getPlatformMBeanServer();
static ::java::lang::Object * newPlatformMXBeanProxy(::javax::management::MBeanServerConnection *, ::java::lang::String *, ::java::lang::Class *);
static ::java::lang::String * CLASS_LOADING_MXBEAN_NAME;
static ::java::lang::String * COMPILATION_MXBEAN_NAME;
static ::java::lang::String * GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE;

View file

@ -0,0 +1,39 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_lang_management_MonitorInfo__
#define __java_lang_management_MonitorInfo__
#pragma interface
#include <java/lang/management/LockInfo.h>
extern "Java"
{
namespace javax
{
namespace management
{
namespace openmbean
{
class CompositeData;
}
}
}
}
class java::lang::management::MonitorInfo : public ::java::lang::management::LockInfo
{
public:
MonitorInfo(::java::lang::String *, jint, jint, ::java::lang::StackTraceElement *);
static ::java::lang::management::MonitorInfo * from(::javax::management::openmbean::CompositeData *);
virtual jint getLockedStackDepth();
virtual ::java::lang::StackTraceElement * getLockedStackFrame();
private:
jint __attribute__((aligned(__alignof__( ::java::lang::management::LockInfo)))) stackDepth;
::java::lang::StackTraceElement * stackFrame;
public:
static ::java::lang::Class class$;
};
#endif // __java_lang_management_MonitorInfo__

View file

@ -15,6 +15,7 @@ public:
virtual ::java::lang::String * getArch() = 0;
virtual jint getAvailableProcessors() = 0;
virtual ::java::lang::String * getName() = 0;
virtual jdouble getSystemLoadAverage() = 0;
virtual ::java::lang::String * getVersion() = 0;
static ::java::lang::Class class$;
} __attribute__ ((java_interface));

View file

@ -29,13 +29,19 @@ class java::lang::management::ThreadInfo : public ::java::lang::Object
{
ThreadInfo(::java::lang::Thread *, jlong, jlong, ::java::lang::Object *, ::java::lang::Thread *, jlong, jlong, jboolean, jboolean, JArray< ::java::lang::StackTraceElement * > *);
ThreadInfo(::java::lang::Thread *, jlong, jlong, ::java::lang::Object *, ::java::lang::Thread *, jlong, jlong, jboolean, jboolean, JArray< ::java::lang::StackTraceElement * > *, JArray< ::java::lang::management::MonitorInfo * > *, JArray< ::java::lang::management::LockInfo * > *);
ThreadInfo(jlong, ::java::lang::String *, ::java::lang::Thread$State *, jlong, jlong, ::java::lang::String *, jlong, ::java::lang::String *, jlong, jlong, jboolean, jboolean, JArray< ::java::lang::StackTraceElement * > *);
ThreadInfo(jlong, ::java::lang::String *, ::java::lang::Thread$State *, jlong, jlong, ::java::lang::String *, jlong, ::java::lang::String *, jlong, jlong, jboolean, jboolean, JArray< ::java::lang::StackTraceElement * > *, JArray< ::java::lang::management::MonitorInfo * > *, JArray< ::java::lang::management::LockInfo * > *);
public: // actually package-private
static void checkAttribute(::javax::management::openmbean::CompositeType *, ::java::lang::String *, ::javax::management::openmbean::OpenType *);
static ::javax::management::openmbean::CompositeType * getStackTraceType();
public:
static ::java::lang::management::ThreadInfo * from(::javax::management::openmbean::CompositeData *);
virtual jlong getBlockedCount();
virtual jlong getBlockedTime();
virtual JArray< ::java::lang::management::MonitorInfo * > * getLockedMonitors();
virtual JArray< ::java::lang::management::LockInfo * > * getLockedSynchronizers();
virtual ::java::lang::management::LockInfo * getLockInfo();
virtual ::java::lang::String * getLockName();
virtual jlong getLockOwnerId();
virtual ::java::lang::String * getLockOwnerName();
@ -49,6 +55,7 @@ public:
virtual jboolean isSuspended();
virtual ::java::lang::String * toString();
private:
jboolean isThreadBlocked();
jlong __attribute__((aligned(__alignof__( ::java::lang::Object)))) threadId;
::java::lang::String * threadName;
::java::lang::Thread$State * threadState;
@ -62,7 +69,10 @@ private:
jboolean isInNative__;
jboolean isSuspended__;
JArray< ::java::lang::StackTraceElement * > * trace;
JArray< ::java::lang::management::MonitorInfo * > * lockedMonitors;
JArray< ::java::lang::management::LockInfo * > * lockedSynchronizers;
static ::java::lang::management::ThreadMXBean * bean;
static ::javax::management::openmbean::CompositeType * seType;
public:
static ::java::lang::Class class$;
};

View file

@ -14,6 +14,8 @@ class java::lang::management::ThreadMXBean : public ::java::lang::Object
{
public:
virtual JArray< ::java::lang::management::ThreadInfo * > * dumpAllThreads(jboolean, jboolean) = 0;
virtual JArray< jlong > * findDeadlockedThreads() = 0;
virtual JArray< jlong > * findMonitorDeadlockedThreads() = 0;
virtual JArray< jlong > * getAllThreadIds() = 0;
virtual jlong getCurrentThreadCpuTime() = 0;
@ -24,11 +26,14 @@ public:
virtual jlong getThreadCpuTime(jlong) = 0;
virtual ::java::lang::management::ThreadInfo * getThreadInfo(jlong) = 0;
virtual JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *) = 0;
virtual JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *, jboolean, jboolean) = 0;
virtual ::java::lang::management::ThreadInfo * getThreadInfo(jlong, jint) = 0;
virtual JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *, jint) = 0;
virtual jlong getThreadUserTime(jlong) = 0;
virtual jlong getTotalStartedThreadCount() = 0;
virtual jboolean isCurrentThreadCpuTimeSupported() = 0;
virtual jboolean isObjectMonitorUsageSupported() = 0;
virtual jboolean isSynchronizerUsageSupported() = 0;
virtual jboolean isThreadContentionMonitoringEnabled() = 0;
virtual jboolean isThreadContentionMonitoringSupported() = 0;
virtual jboolean isThreadCpuTimeEnabled() = 0;

View file

@ -1,5 +1,5 @@
/* MulticastSocket.java -- Class for using multicast sockets
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2007
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -338,7 +338,7 @@ public class MulticastSocket extends DatagramSocket
/**
* Sets the "Time to Live" value for a socket. The value must be between
* 1 and 255.
* 0 and 255, inclusive.
*
* @param ttl The new TTL value
*
@ -351,7 +351,7 @@ public class MulticastSocket extends DatagramSocket
if (isClosed())
throw new SocketException("socket is closed");
if (ttl <= 0 || ttl > 255)
if (ttl < 0 || ttl > 255)
throw new IllegalArgumentException("Invalid ttl: " + ttl);
getImpl().setTimeToLive(ttl);

View file

@ -9,6 +9,16 @@
#include <java/lang/Object.h>
extern "Java"
{
namespace gnu
{
namespace java
{
namespace net
{
class PlainSocketImpl;
}
}
}
namespace java
{
namespace net
@ -35,7 +45,7 @@ class java::net::ServerSocket : public ::java::lang::Object
{
public: // actually package-private
ServerSocket(::java::net::SocketImpl *);
ServerSocket(::gnu::java::net::PlainSocketImpl *);
virtual ::java::net::SocketImpl * getImpl();
public:
ServerSocket();

View file

@ -91,6 +91,7 @@ public:
public: // actually package-private
static ::java::net::SocketImplFactory * factory;
::java::net::SocketImpl * __attribute__((aligned(__alignof__( ::java::lang::Object)))) impl;
jboolean implCreated;
jboolean bound;
private:
jboolean inputShutdown;

View file

@ -24,6 +24,7 @@ class java::net::URL$1 : public ::java::lang::Object
public: // actually package-private
URL$1();
public:
::java::lang::ClassLoader * URL$1$run();
::java::lang::Object * run();
static ::java::lang::Class class$;
};

View file

@ -31,6 +31,7 @@ class java::net::URLClassLoader$1 : public ::java::lang::Object
public: // actually package-private
URLClassLoader$1(::java::net::URLClassLoader *, ::java::lang::String *, JArray< jbyte > *, ::java::security::CodeSource *);
public:
::java::lang::Class * URLClassLoader$1$run();
::java::lang::Object * run();
public: // actually package-private
::java::net::URLClassLoader * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$0;

View file

@ -13,6 +13,7 @@ extern "Java"
{
namespace net
{
class URLClassLoader;
class URLClassLoader$2;
}
}
@ -24,6 +25,7 @@ class java::net::URLClassLoader$2 : public ::java::lang::Object
public: // actually package-private
URLClassLoader$2(::java::lang::ClassLoader *, ::java::lang::Object *);
public:
::java::net::URLClassLoader * URLClassLoader$2$run();
::java::lang::Object * run();
private:
::java::lang::ClassLoader * __attribute__((aligned(__alignof__( ::java::lang::Object)))) val$parent;

View file

@ -1,46 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$CoreResource__
#define __java_net_URLClassLoader$CoreResource__
#pragma interface
#include <java/net/URLClassLoader$Resource.h>
extern "Java"
{
namespace gnu
{
namespace gcj
{
class Core;
}
}
namespace java
{
namespace net
{
class URL;
class URLClassLoader$CoreResource;
class URLClassLoader$CoreURLLoader;
}
}
}
class java::net::URLClassLoader$CoreResource : public ::java::net::URLClassLoader$Resource
{
public: // actually package-private
URLClassLoader$CoreResource(::java::net::URLClassLoader$CoreURLLoader *, ::java::lang::String *, ::gnu::gcj::Core *);
::java::io::InputStream * getInputStream();
public:
jint getLength();
::java::net::URL * getURL();
private:
::gnu::gcj::Core * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$Resource)))) core;
::java::lang::String * name;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$CoreResource__

View file

@ -1,36 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$CoreURLLoader__
#define __java_net_URLClassLoader$CoreURLLoader__
#pragma interface
#include <java/net/URLClassLoader$URLLoader.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader;
class URLClassLoader$CoreURLLoader;
class URLClassLoader$Resource;
}
}
}
class java::net::URLClassLoader$CoreURLLoader : public ::java::net::URLClassLoader$URLLoader
{
public: // actually package-private
URLClassLoader$CoreURLLoader(::java::net::URLClassLoader *, ::java::net::URL *);
::java::net::URLClassLoader$Resource * getResource(::java::lang::String *);
private:
::java::lang::String * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$URLLoader)))) dir;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$CoreURLLoader__

View file

@ -1,38 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$FileResource__
#define __java_net_URLClassLoader$FileResource__
#pragma interface
#include <java/net/URLClassLoader$Resource.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader$FileResource;
class URLClassLoader$FileURLLoader;
}
}
}
class java::net::URLClassLoader$FileResource : public ::java::net::URLClassLoader$Resource
{
public: // actually package-private
URLClassLoader$FileResource(::java::net::URLClassLoader$FileURLLoader *, ::java::io::File *);
::java::io::InputStream * getInputStream();
public:
jint getLength();
::java::net::URL * getURL();
public: // actually package-private
::java::io::File * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$Resource)))) file;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$FileResource__

View file

@ -1,35 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$FileURLLoader__
#define __java_net_URLClassLoader$FileURLLoader__
#pragma interface
#include <java/net/URLClassLoader$URLLoader.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader;
class URLClassLoader$FileURLLoader;
class URLClassLoader$Resource;
}
}
}
class java::net::URLClassLoader$FileURLLoader : public ::java::net::URLClassLoader$URLLoader
{
public: // actually package-private
URLClassLoader$FileURLLoader(::java::net::URLClassLoader *, ::java::net::URL *, ::java::net::URL *);
::java::net::URLClassLoader$Resource * getResource(::java::lang::String *);
::java::io::File * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$URLLoader)))) dir;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$FileURLLoader__

View file

@ -1,40 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$JarURLLoader__
#define __java_net_URLClassLoader$JarURLLoader__
#pragma interface
#include <java/net/URLClassLoader$URLLoader.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader;
class URLClassLoader$JarURLLoader;
class URLClassLoader$Resource;
}
}
}
class java::net::URLClassLoader$JarURLLoader : public ::java::net::URLClassLoader$URLLoader
{
public:
URLClassLoader$JarURLLoader(::java::net::URLClassLoader *, ::java::net::URL *, ::java::net::URL *);
public: // actually package-private
::java::net::URLClassLoader$Resource * getResource(::java::lang::String *);
::java::util::jar::Manifest * getManifest();
::java::util::Vector * getClassPath();
::java::util::jar::JarFile * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$URLLoader)))) jarfile;
::java::net::URL * baseJarURL;
::java::util::Vector * classPath;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$JarURLLoader__

View file

@ -1,48 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$JarURLResource__
#define __java_net_URLClassLoader$JarURLResource__
#pragma interface
#include <java/net/URLClassLoader$Resource.h>
#include <gcj/array.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader$JarURLLoader;
class URLClassLoader$JarURLResource;
}
namespace security
{
namespace cert
{
class Certificate;
}
}
}
}
class java::net::URLClassLoader$JarURLResource : public ::java::net::URLClassLoader$Resource
{
public: // actually package-private
URLClassLoader$JarURLResource(::java::net::URLClassLoader$JarURLLoader *, ::java::lang::String *, ::java::util::jar::JarEntry *);
::java::io::InputStream * getInputStream();
jint getLength();
JArray< ::java::security::cert::Certificate * > * getCertificates();
::java::net::URL * getURL();
private:
::java::util::jar::JarEntry * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$Resource)))) entry;
::java::lang::String * name;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$JarURLResource__

View file

@ -1,40 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$RemoteResource__
#define __java_net_URLClassLoader$RemoteResource__
#pragma interface
#include <java/net/URLClassLoader$Resource.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader$RemoteResource;
class URLClassLoader$RemoteURLLoader;
}
}
}
class java::net::URLClassLoader$RemoteResource : public ::java::net::URLClassLoader$Resource
{
public: // actually package-private
URLClassLoader$RemoteResource(::java::net::URLClassLoader$RemoteURLLoader *, ::java::lang::String *, ::java::net::URL *, ::java::io::InputStream *, jint);
::java::io::InputStream * getInputStream();
public:
jint getLength();
::java::net::URL * getURL();
private:
::java::net::URL * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$Resource)))) url;
::java::io::InputStream * stream;
jint length;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$RemoteResource__

View file

@ -1,36 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$RemoteURLLoader__
#define __java_net_URLClassLoader$RemoteURLLoader__
#pragma interface
#include <java/net/URLClassLoader$URLLoader.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader;
class URLClassLoader$RemoteURLLoader;
class URLClassLoader$Resource;
}
}
}
class java::net::URLClassLoader$RemoteURLLoader : public ::java::net::URLClassLoader$URLLoader
{
public: // actually package-private
URLClassLoader$RemoteURLLoader(::java::net::URLClassLoader *, ::java::net::URL *);
::java::net::URLClassLoader$Resource * getResource(::java::lang::String *);
private:
::java::lang::String * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$URLLoader)))) protocol;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$RemoteURLLoader__

View file

@ -1,48 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$Resource__
#define __java_net_URLClassLoader$Resource__
#pragma interface
#include <java/lang/Object.h>
#include <gcj/array.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader$Resource;
class URLClassLoader$URLLoader;
}
namespace security
{
class CodeSource;
namespace cert
{
class Certificate;
}
}
}
}
class java::net::URLClassLoader$Resource : public ::java::lang::Object
{
public: // actually package-private
URLClassLoader$Resource(::java::net::URLClassLoader$URLLoader *);
virtual ::java::security::CodeSource * getCodeSource();
virtual JArray< ::java::security::cert::Certificate * > * getCertificates();
virtual ::java::net::URL * getURL() = 0;
virtual jint getLength() = 0;
virtual ::java::io::InputStream * getInputStream() = 0;
::java::net::URLClassLoader$URLLoader * __attribute__((aligned(__alignof__( ::java::lang::Object)))) loader;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$Resource__

View file

@ -1,38 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$SoResource__
#define __java_net_URLClassLoader$SoResource__
#pragma interface
#include <java/net/URLClassLoader$Resource.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader$SoResource;
class URLClassLoader$SoURLLoader;
}
}
}
class java::net::URLClassLoader$SoResource : public ::java::net::URLClassLoader$Resource
{
public: // actually package-private
URLClassLoader$SoResource(::java::net::URLClassLoader$SoURLLoader *, ::java::net::URL *);
::java::io::InputStream * getInputStream();
public:
jint getLength();
::java::net::URL * getURL();
public: // actually package-private
::java::net::URL * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$Resource)))) url;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$SoResource__

View file

@ -1,47 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$SoURLLoader__
#define __java_net_URLClassLoader$SoURLLoader__
#pragma interface
#include <java/net/URLClassLoader$URLLoader.h>
extern "Java"
{
namespace gnu
{
namespace gcj
{
namespace runtime
{
class SharedLibHelper;
}
}
}
namespace java
{
namespace net
{
class URL;
class URLClassLoader;
class URLClassLoader$Resource;
class URLClassLoader$SoURLLoader;
}
}
}
class java::net::URLClassLoader$SoURLLoader : public ::java::net::URLClassLoader$URLLoader
{
public: // actually package-private
URLClassLoader$SoURLLoader(::java::net::URLClassLoader *, ::java::net::URL *);
URLClassLoader$SoURLLoader(::java::net::URLClassLoader *, ::java::net::URL *, ::java::net::URL *);
::java::lang::Class * getClass(::java::lang::String *);
::java::net::URLClassLoader$Resource * getResource(::java::lang::String *);
::gnu::gcj::runtime::SharedLibHelper * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader$URLLoader)))) helper;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$SoURLLoader__

View file

@ -1,45 +0,0 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_net_URLClassLoader$URLLoader__
#define __java_net_URLClassLoader$URLLoader__
#pragma interface
#include <java/lang/Object.h>
extern "Java"
{
namespace java
{
namespace net
{
class URL;
class URLClassLoader;
class URLClassLoader$Resource;
class URLClassLoader$URLLoader;
}
namespace security
{
class CodeSource;
}
}
}
class java::net::URLClassLoader$URLLoader : public ::java::lang::Object
{
public: // actually package-private
URLClassLoader$URLLoader(::java::net::URLClassLoader *, ::java::net::URL *);
URLClassLoader$URLLoader(::java::net::URLClassLoader *, ::java::net::URL *, ::java::net::URL *);
virtual ::java::lang::Class * getClass(::java::lang::String *);
virtual ::java::net::URLClassLoader$Resource * getResource(::java::lang::String *) = 0;
virtual ::java::util::jar::Manifest * getManifest();
virtual ::java::util::Vector * getClassPath();
::java::net::URLClassLoader * __attribute__((aligned(__alignof__( ::java::lang::Object)))) classloader;
::java::net::URL * baseURL;
::java::security::CodeSource * noCertCodeSource;
public:
static ::java::lang::Class class$;
};
#endif // __java_net_URLClassLoader$URLLoader__

View file

@ -15,6 +15,7 @@ extern "Java"
{
namespace channels
{
class Channel;
class DatagramChannel;
class Pipe;
class ServerSocketChannel;
@ -40,6 +41,7 @@ public:
virtual ::java::nio::channels::spi::AbstractSelector * openSelector() = 0;
virtual ::java::nio::channels::ServerSocketChannel * openServerSocketChannel() = 0;
virtual ::java::nio::channels::SocketChannel * openSocketChannel() = 0;
virtual ::java::nio::channels::Channel * inheritedChannel();
static ::java::nio::channels::spi::SelectorProvider * provider();
private:
static ::java::nio::channels::spi::SelectorProvider * systemDefaultProvider;

View file

@ -18,6 +18,13 @@ extern "Java"
namespace security
{
class OID;
namespace x509
{
namespace ext
{
class GeneralName;
}
}
}
}
}
@ -60,51 +67,61 @@ extern "Java"
class java::security::cert::X509CertSelector : public ::java::lang::Object
{
static jboolean checkOid(JArray< jint > *);
static ::gnu::java::security::x509::ext::GeneralName * makeName(jint, ::java::lang::String *);
public:
X509CertSelector();
virtual ::java::security::cert::X509Certificate * getCertificate();
virtual void setCertificate(::java::security::cert::X509Certificate *);
virtual ::java::math::BigInteger * getSerialNumber();
virtual void setSerialNumber(::java::math::BigInteger *);
virtual ::java::lang::String * getIssuerAsString();
virtual JArray< jbyte > * getIssuerAsBytes();
virtual void setIssuer(::java::lang::String *);
virtual void setIssuer(JArray< jbyte > *);
virtual ::java::lang::String * getSubjectAsString();
virtual JArray< jbyte > * getSubjectAsBytes();
virtual void setSubject(::java::lang::String *);
virtual void setSubject(JArray< jbyte > *);
virtual JArray< jbyte > * getSubjectKeyIdentifier();
virtual void setSubjectKeyIdentifier(JArray< jbyte > *);
virtual JArray< jbyte > * getAuthorityKeyIdentifier();
virtual void setAuthorityKeyIdentifier(JArray< jbyte > *);
virtual ::java::util::Date * getCertificateValid();
virtual void setCertificateValid(::java::util::Date *);
virtual ::java::util::Date * getPrivateKeyValid();
virtual void setPrivateKeyValid(::java::util::Date *);
virtual ::java::lang::String * getSubjectPublicKeyAlgID();
virtual void setSubjectPublicKeyAlgID(::java::lang::String *);
virtual ::java::security::PublicKey * getSubjectPublicKey();
virtual void setSubjectPublicKey(::java::security::PublicKey *);
virtual void setSubjectPublicKey(JArray< jbyte > *);
virtual JArray< jboolean > * getKeyUsage();
virtual void setKeyUsage(JArray< jboolean > *);
virtual ::java::util::Set * getExtendedKeyUsage();
virtual void setExtendedKeyUsage(::java::util::Set *);
virtual jboolean getMatchAllSubjectAltNames();
virtual void setMatchAllSubjectAltNames(jboolean);
virtual void setSubjectAlternativeNames(::java::util::Collection *);
virtual void addSubjectAlternativeName(jint, ::java::lang::String *);
virtual void addPathToName(jint, JArray< jbyte > *);
virtual void addPathToName(jint, ::java::lang::String *);
virtual void addSubjectAlternativeName(jint, JArray< jbyte > *);
virtual JArray< jbyte > * getNameConstraints();
virtual void setNameConstraints(JArray< jbyte > *);
virtual jint getBasicConstraints();
virtual void setBasicConstraints(jint);
virtual jboolean match(::java::security::cert::Certificate *);
virtual ::java::lang::String * toString();
virtual void addSubjectAlternativeName(jint, ::java::lang::String *);
virtual ::java::lang::Object * clone();
virtual JArray< jbyte > * getAuthorityKeyIdentifier();
virtual jint getBasicConstraints();
virtual ::java::security::cert::X509Certificate * getCertificate();
virtual ::java::util::Date * getCertificateValid();
virtual ::java::util::Set * getExtendedKeyUsage();
virtual JArray< jbyte > * getIssuerAsBytes();
virtual ::java::lang::String * getIssuerAsString();
virtual JArray< jboolean > * getKeyUsage();
virtual jboolean getMatchAllSubjectAltNames();
virtual JArray< jbyte > * getNameConstraints();
virtual ::java::util::Collection * getPathToNames();
virtual ::java::util::Set * getPolicy();
virtual ::java::util::Date * getPrivateKeyValid();
virtual ::java::math::BigInteger * getSerialNumber();
virtual ::java::util::Collection * getSubjectAlternativeNames();
virtual JArray< jbyte > * getSubjectAsBytes();
virtual ::java::lang::String * getSubjectAsString();
virtual JArray< jbyte > * getSubjectKeyIdentifier();
virtual ::java::security::PublicKey * getSubjectPublicKey();
virtual ::java::lang::String * getSubjectPublicKeyAlgID();
virtual jboolean match(::java::security::cert::Certificate *);
virtual void setAuthorityKeyIdentifier(JArray< jbyte > *);
virtual void setBasicConstraints(jint);
virtual void setCertificate(::java::security::cert::X509Certificate *);
virtual void setCertificateValid(::java::util::Date *);
virtual void setExtendedKeyUsage(::java::util::Set *);
virtual void setIssuer(JArray< jbyte > *);
virtual void setIssuer(::java::lang::String *);
virtual void setKeyUsage(JArray< jboolean > *);
virtual void setMatchAllSubjectAltNames(jboolean);
virtual void setNameConstraints(JArray< jbyte > *);
virtual void setPathToNames(::java::util::Collection *);
virtual void setPolicy(::java::util::Set *);
virtual void setPrivateKeyValid(::java::util::Date *);
virtual void setSerialNumber(::java::math::BigInteger *);
virtual void setSubject(JArray< jbyte > *);
virtual void setSubject(::java::lang::String *);
virtual void setSubjectAlternativeNames(::java::util::Collection *);
virtual void setSubjectKeyIdentifier(JArray< jbyte > *);
virtual void setSubjectPublicKey(JArray< jbyte > *);
virtual void setSubjectPublicKey(::java::security::PublicKey *);
virtual void setSubjectPublicKeyAlgID(::java::lang::String *);
virtual ::java::lang::String * toString();
public: // actually package-private
static JArray< jint > * $SWITCH_TABLE$gnu$java$security$x509$ext$GeneralName$Kind();
private:
static jboolean checkOid(JArray< jint > *);
static ::java::lang::String * AUTH_KEY_ID;
static ::java::lang::String * SUBJECT_KEY_ID;
static ::java::lang::String * NAME_CONSTRAINTS_ID;
@ -125,6 +142,8 @@ private:
jboolean matchAllNames;
JArray< jbyte > * nameConstraints;
::java::util::Set * policy;
::java::util::List * pathToNames;
static JArray< jint > * $SWITCH_TABLE$gnu$java$security$x509$ext$GeneralName$Kind__;
public:
static ::java::lang::Class class$;
};

View file

@ -38,10 +38,13 @@ exception statement from your version. */
package java.text;
import java.text.spi.CollatorProvider;
import java.util.Comparator;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.ServiceLoader;
/**
* This class is the abstract superclass of classes which perform
@ -286,7 +289,8 @@ public abstract class Collator implements Comparator<Object>, Cloneable
/**
* This method returns an instance of <code>Collator</code> for the
* specified locale. If no <code>Collator</code> exists for the desired
* locale, a <code>Collator</code> for the default locale will be returned.
* locale, the fallback procedure described in
* {@link java.util.spi.LocaleServiceProvider} is invoked.
*
* @param loc The desired locale to load a <code>Collator</code> for.
*
@ -294,27 +298,52 @@ public abstract class Collator implements Comparator<Object>, Cloneable
*/
public static Collator getInstance (Locale loc)
{
ResourceBundle res;
String pattern;
try
{
res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
loc, ClassLoader.getSystemClassLoader());
pattern = res.getString("collation_rules");
ResourceBundle res =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
loc, ClassLoader.getSystemClassLoader());
return new RuleBasedCollator(res.getString("collation_rules"));
}
catch (MissingResourceException x)
{
pattern = "<0<1<2<3<4<5<6<7<8<9<A,a<b,B<c,C<d,D<e,E<f,F<g,G<h,H<i,I<j,J<k,K" +
"<l,L<m,M<n,N<o,O<p,P<q,Q<r,R<s,S<t,T<u,U<v,V<w,W<x,X<y,Y<z,Z";
}
try
{
return new RuleBasedCollator (pattern);
/* This means runtime support for the locale
* is not available, so we check providers. */
}
catch (ParseException x)
{
throw (InternalError)new InternalError().initCause(x);
}
for (CollatorProvider p : ServiceLoader.load(CollatorProvider.class))
{
for (Locale l : p.getAvailableLocales())
{
if (l.equals(loc))
{
Collator c = p.getInstance(loc);
if (c != null)
return c;
break;
}
}
}
if (loc.equals(Locale.ROOT))
{
try
{
return new RuleBasedCollator("<0<1<2<3<4<5<6<7<8<9<A,a<b,B<c," +
"C<d,D<e,E<f,F<g,G<h,H<i,I<j,J<k,K" +
"<l,L<m,M<n,N<o,O<p,P<q,Q<r,R<s,S<t,"+
"T<u,U<v,V<w,W<x,X<y,Y<z,Z");
}
catch (ParseException x)
{
throw (InternalError)new InternalError().initCause(x);
}
}
// FIXME
return getInstance(Locale.US);
}
/**

View file

@ -39,6 +39,7 @@ public:
private:
static ::java::text::DateFormat * computeInstance(jint, ::java::util::Locale *, jboolean, jboolean);
static ::java::text::DateFormat * computeInstance(jint, jint, ::java::util::Locale *, jboolean, jboolean);
static ::java::text::DateFormat * computeDefault(jint, jint, jboolean, jboolean);
public:
static ::java::text::DateFormat * getDateInstance();
static ::java::text::DateFormat * getDateInstance(jint);

View file

@ -50,6 +50,8 @@ public:
virtual jboolean equals(::java::lang::Object *);
virtual ::java::lang::Object * clone();
virtual jint hashCode();
static ::java::text::DateFormatSymbols * getInstance();
static ::java::text::DateFormatSymbols * getInstance(::java::util::Locale *);
public: // actually package-private
JArray< ::java::lang::String * > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) ampms;
JArray< ::java::lang::String * > * eras;
@ -61,6 +63,7 @@ public: // actually package-private
JArray< ::java::lang::String * > * shortWeekdays;
JArray< ::java::lang::String * > * weekdays;
private:
JArray< JArray< ::java::lang::String * > * > * runtimeZoneStrings;
JArray< JArray< ::java::lang::String * > * > * zoneStrings;
static const jlong serialVersionUID = -5987973545549424702LL;
static JArray< ::java::lang::String * > * formatPrefixes;

View file

@ -1,5 +1,5 @@
/* DateFormatSymbols.java -- Format over a range of numbers
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,14 +38,25 @@ exception statement from your version. */
package java.text;
import gnu.java.locale.LocaleHelper;
import java.text.spi.DateFormatSymbolsProvider;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.ServiceLoader;
import java.util.TimeZone;
import java.util.spi.TimeZoneNameProvider;
/**
* This class acts as container for locale specific date/time formatting
* information such as the days of the week and the months of the year.
* @author Per Bothner (bothner@cygnus.com)
*
* @date October 24, 1998.
*/
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3.
@ -60,6 +71,15 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
String[] shortMonths;
String[] shortWeekdays;
String[] weekdays;
/**
* The timezone strings supplied by the runtime.
*/
private String[][] runtimeZoneStrings;
/**
* Custom timezone strings supplied by {@link #setZoneStrings()}.
*/
private String[][] zoneStrings;
private static final long serialVersionUID = -5987973545549424702L;
@ -91,11 +111,18 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
/**
* This method initializes a new instance of <code>DateFormatSymbols</code>
* by loading the date format information for the specified locale.
* This constructor only obtains instances using the runtime's resources;
* to also include {@link java.text.spi.DateFormatSymbolsProvider} instances,
* call {@link #getInstance(java.util.Locale)} instead.
*
* @param locale The locale for which date formatting symbols should
* be loaded.
* @throws MissingResourceException if the resources for the specified
* locale could not be found or loaded.
* @see #getInstance(java.util.Locale)
*/
public DateFormatSymbols (Locale locale) throws MissingResourceException
public DateFormatSymbols (Locale locale)
throws MissingResourceException
{
ResourceBundle res
= ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale,
@ -116,9 +143,16 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
/**
* This method loads the format symbol information for the default
* locale.
* locale. This constructor only obtains instances using the runtime's resources;
* to also include {@link java.text.spi.DateFormatSymbolsProvider} instances,
* call {@link #getInstance()} instead.
*
* @throws MissingResourceException if the resources for the default
* locale could not be found or loaded.
* @see #getInstance()
*/
public DateFormatSymbols () throws MissingResourceException
public DateFormatSymbols()
throws MissingResourceException
{
this (Locale.getDefault());
}
@ -499,4 +533,65 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
^ hashCode(weekdays)
^ hashCode(zoneStrings));
}
/**
* Returns a {@link DateFormatSymbols} instance for the
* default locale obtained from either the runtime itself
* or one of the installed
* {@link java.text.spi.DateFormatSymbolsProvider} instances.
* This is equivalent to calling
* <code>getInstance(Locale.getDefault())</code>.
*
* @return a {@link DateFormatSymbols} instance for the default
* locale.
* @since 1.6
*/
public static final DateFormatSymbols getInstance()
{
return getInstance(Locale.getDefault());
}
/**
* Returns a {@link DateFormatSymbols} instance for the
* specified locale obtained from either the runtime itself
* or one of the installed
* {@link java.text.spi.DateFormatSymbolsProvider} instances.
*
* @param locale the locale for which an instance should be
* returned.
* @return a {@link DateFormatSymbols} instance for the specified
* locale.
* @throws NullPointerException if <code>locale</code> is
* <code>null</code>.
* @since 1.6
*/
public static final DateFormatSymbols getInstance(Locale locale)
{
try
{
DateFormatSymbols syms = new DateFormatSymbols(locale);
return syms;
}
catch (MissingResourceException e)
{
/* This means runtime support for the locale
* is not available, so we check providers. */
}
for (DateFormatSymbolsProvider p :
ServiceLoader.load(DateFormatSymbolsProvider.class))
{
for (Locale loc : p.getAvailableLocales())
{
if (loc.equals(locale))
{
DateFormatSymbols syms = p.getInstance(locale);
if (syms != null)
return syms;
break;
}
}
}
return getInstance(LocaleHelper.getFallbackLocale(locale));
}
}

View file

@ -67,6 +67,10 @@ public:
void setZeroDigit(jchar);
private:
void readObject(::java::io::ObjectInputStream *);
public:
static ::java::text::DecimalFormatSymbols * getInstance();
static ::java::text::DecimalFormatSymbols * getInstance(::java::util::Locale *);
private:
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) currencySymbol;
jchar decimalSeparator;
jchar digit;

View file

@ -38,13 +38,19 @@ exception statement from your version. */
package java.text;
import gnu.java.locale.LocaleHelper;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.text.spi.DecimalFormatSymbolsProvider;
import java.util.Currency;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.ServiceLoader;
/**
* This class is a container for the symbols used by
@ -77,6 +83,11 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
/**
* This method initializes a new instance of
* <code>DecimalFormatSymbols</code> for the default locale.
* This constructor only obtains instances using the runtime's resources;
* to also include {@link java.text.spi.DateFormatSymbolsProvider} instances,
* call {@link #getInstance()} instead.
*
* @see #getInstance()
*/
public DecimalFormatSymbols ()
{
@ -664,4 +675,68 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
serialVersionOnStream = 2;
}
/**
* Returns a {@link DecimalFormatSymbols} instance for the
* default locale obtained from either the runtime itself
* or one of the installed
* {@link java.text.spi.DecimalFormatSymbolsProvider} instances.
* This is equivalent to calling
* <code>getInstance(Locale.getDefault())</code>.
*
* @return a {@link DecimalFormatSymbols} instance for the default
* locale.
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance()
{
return getInstance(Locale.getDefault());
}
/**
* Returns a {@link DecimalFormatSymbols} instance for the
* specified locale obtained from either the runtime itself
* or one of the installed
* {@link java.text.spi.DecimalFormatSymbolsProvider} instances.
*
* @param locale the locale for which an instance should be
* returned.
* @return a {@link DecimalFormatSymbols} instance for the specified
* locale.
* @throws NullPointerException if <code>locale</code> is
* <code>null</code>.
* @since 1.6
*/
public static final DecimalFormatSymbols getInstance(Locale locale)
{
try
{
if (!locale.equals(Locale.ROOT))
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
locale,
ClassLoader.getSystemClassLoader());
return new DecimalFormatSymbols(locale);
}
catch (MissingResourceException x)
{
/* This means runtime support for the locale
* is not available, so we check providers. */
}
for (DecimalFormatSymbolsProvider p :
ServiceLoader.load(DecimalFormatSymbolsProvider.class))
{
for (Locale loc : p.getAvailableLocales())
{
if (loc.equals(locale))
{
DecimalFormatSymbols syms = p.getInstance(locale);
if (syms != null)
return syms;
break;
}
}
}
return getInstance(LocaleHelper.getFallbackLocale(locale));
}
}

View file

@ -0,0 +1,38 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_text_spi_BreakIteratorProvider__
#define __java_text_spi_BreakIteratorProvider__
#pragma interface
#include <java/util/spi/LocaleServiceProvider.h>
extern "Java"
{
namespace java
{
namespace text
{
class BreakIterator;
namespace spi
{
class BreakIteratorProvider;
}
}
}
}
class java::text::spi::BreakIteratorProvider : public ::java::util::spi::LocaleServiceProvider
{
public: // actually protected
BreakIteratorProvider();
public:
virtual ::java::text::BreakIterator * getCharacterInstance(::java::util::Locale *) = 0;
virtual ::java::text::BreakIterator * getLineInstance(::java::util::Locale *) = 0;
virtual ::java::text::BreakIterator * getSentenceInstance(::java::util::Locale *) = 0;
virtual ::java::text::BreakIterator * getWordInstance(::java::util::Locale *) = 0;
static ::java::lang::Class class$;
};
#endif // __java_text_spi_BreakIteratorProvider__

View file

@ -0,0 +1,35 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_text_spi_CollatorProvider__
#define __java_text_spi_CollatorProvider__
#pragma interface
#include <java/util/spi/LocaleServiceProvider.h>
extern "Java"
{
namespace java
{
namespace text
{
class Collator;
namespace spi
{
class CollatorProvider;
}
}
}
}
class java::text::spi::CollatorProvider : public ::java::util::spi::LocaleServiceProvider
{
public: // actually protected
CollatorProvider();
public:
virtual ::java::text::Collator * getInstance(::java::util::Locale *) = 0;
static ::java::lang::Class class$;
};
#endif // __java_text_spi_CollatorProvider__

View file

@ -0,0 +1,37 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_text_spi_DateFormatProvider__
#define __java_text_spi_DateFormatProvider__
#pragma interface
#include <java/util/spi/LocaleServiceProvider.h>
extern "Java"
{
namespace java
{
namespace text
{
class DateFormat;
namespace spi
{
class DateFormatProvider;
}
}
}
}
class java::text::spi::DateFormatProvider : public ::java::util::spi::LocaleServiceProvider
{
public: // actually protected
DateFormatProvider();
public:
virtual ::java::text::DateFormat * getDateInstance(jint, ::java::util::Locale *) = 0;
virtual ::java::text::DateFormat * getDateTimeInstance(jint, jint, ::java::util::Locale *) = 0;
virtual ::java::text::DateFormat * getTimeInstance(jint, ::java::util::Locale *) = 0;
static ::java::lang::Class class$;
};
#endif // __java_text_spi_DateFormatProvider__

View file

@ -0,0 +1,35 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_text_spi_DateFormatSymbolsProvider__
#define __java_text_spi_DateFormatSymbolsProvider__
#pragma interface
#include <java/util/spi/LocaleServiceProvider.h>
extern "Java"
{
namespace java
{
namespace text
{
class DateFormatSymbols;
namespace spi
{
class DateFormatSymbolsProvider;
}
}
}
}
class java::text::spi::DateFormatSymbolsProvider : public ::java::util::spi::LocaleServiceProvider
{
public: // actually protected
DateFormatSymbolsProvider();
public:
virtual ::java::text::DateFormatSymbols * getInstance(::java::util::Locale *) = 0;
static ::java::lang::Class class$;
};
#endif // __java_text_spi_DateFormatSymbolsProvider__

View file

@ -0,0 +1,35 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_text_spi_DecimalFormatSymbolsProvider__
#define __java_text_spi_DecimalFormatSymbolsProvider__
#pragma interface
#include <java/util/spi/LocaleServiceProvider.h>
extern "Java"
{
namespace java
{
namespace text
{
class DecimalFormatSymbols;
namespace spi
{
class DecimalFormatSymbolsProvider;
}
}
}
}
class java::text::spi::DecimalFormatSymbolsProvider : public ::java::util::spi::LocaleServiceProvider
{
public: // actually protected
DecimalFormatSymbolsProvider();
public:
virtual ::java::text::DecimalFormatSymbols * getInstance(::java::util::Locale *) = 0;
static ::java::lang::Class class$;
};
#endif // __java_text_spi_DecimalFormatSymbolsProvider__

View file

@ -0,0 +1,38 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_text_spi_NumberFormatProvider__
#define __java_text_spi_NumberFormatProvider__
#pragma interface
#include <java/util/spi/LocaleServiceProvider.h>
extern "Java"
{
namespace java
{
namespace text
{
class NumberFormat;
namespace spi
{
class NumberFormatProvider;
}
}
}
}
class java::text::spi::NumberFormatProvider : public ::java::util::spi::LocaleServiceProvider
{
public: // actually protected
NumberFormatProvider();
public:
virtual ::java::text::NumberFormat * getCurrencyInstance(::java::util::Locale *) = 0;
virtual ::java::text::NumberFormat * getIntegerInstance(::java::util::Locale *) = 0;
virtual ::java::text::NumberFormat * getNumberInstance(::java::util::Locale *) = 0;
virtual ::java::text::NumberFormat * getPercentInstance(::java::util::Locale *) = 0;
static ::java::lang::Class class$;
};
#endif // __java_text_spi_NumberFormatProvider__

View file

@ -20,6 +20,8 @@ public:
virtual jint hashCode();
virtual ::java::lang::Object * setValue(::java::lang::Object *);
virtual ::java::lang::String * toString();
private:
static const jlong serialVersionUID = -8499721149061103585LL;
public: // actually package-private
::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) key;
::java::lang::Object * value;

View file

@ -17,6 +17,8 @@ public:
virtual ::java::lang::Object * getKey();
virtual ::java::lang::Object * getValue();
virtual ::java::lang::Object * setValue(::java::lang::Object *);
private:
static const jlong serialVersionUID = 7138329143949025153LL;
public: // actually package-private
::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) key;
::java::lang::Object * value;

View file

@ -16,14 +16,23 @@ class java::util::Arrays : public ::java::lang::Object
Arrays();
public:
static jint binarySearch(JArray< jbyte > *, jbyte);
static jint binarySearch(JArray< jbyte > *, jint, jint, jbyte);
static jint binarySearch(JArray< jchar > *, jchar);
static jint binarySearch(JArray< jchar > *, jint, jint, jchar);
static jint binarySearch(JArray< jshort > *, jshort);
static jint binarySearch(JArray< jshort > *, jint, jint, jshort);
static jint binarySearch(JArray< jint > *, jint);
static jint binarySearch(JArray< jint > *, jint, jint, jint);
static jint binarySearch(JArray< jlong > *, jlong);
static jint binarySearch(JArray< jlong > *, jint, jint, jlong);
static jint binarySearch(JArray< jfloat > *, jfloat);
static jint binarySearch(JArray< jfloat > *, jint, jint, jfloat);
static jint binarySearch(JArray< jdouble > *, jdouble);
static jint binarySearch(JArray< jdouble > *, jint, jint, jdouble);
static jint binarySearch(JArray< ::java::lang::Object * > *, ::java::lang::Object *);
static jint binarySearch(JArray< ::java::lang::Object * > *, jint, jint, ::java::lang::Object *);
static jint binarySearch(JArray< ::java::lang::Object * > *, ::java::lang::Object *, ::java::util::Comparator *);
static jint binarySearch(JArray< ::java::lang::Object * > *, jint, jint, ::java::lang::Object *, ::java::util::Comparator *);
static jboolean equals(JArray< jboolean > *, JArray< jboolean > *);
static jboolean equals(JArray< jbyte > *, JArray< jbyte > *);
static jboolean equals(JArray< jchar > *, JArray< jchar > *);
@ -138,6 +147,26 @@ private:
static void deepToString(JArray< ::java::lang::Object * > *, ::java::lang::StringBuilder *, ::java::util::HashSet *);
public:
static ::java::lang::String * deepToString(JArray< ::java::lang::Object * > *);
static JArray< jboolean > * copyOf(JArray< jboolean > *, jint);
static JArray< jboolean > * copyOfRange(JArray< jboolean > *, jint, jint);
static JArray< jbyte > * copyOf(JArray< jbyte > *, jint);
static JArray< jbyte > * copyOfRange(JArray< jbyte > *, jint, jint);
static JArray< jchar > * copyOf(JArray< jchar > *, jint);
static JArray< jchar > * copyOfRange(JArray< jchar > *, jint, jint);
static JArray< jdouble > * copyOf(JArray< jdouble > *, jint);
static JArray< jdouble > * copyOfRange(JArray< jdouble > *, jint, jint);
static JArray< jfloat > * copyOf(JArray< jfloat > *, jint);
static JArray< jfloat > * copyOfRange(JArray< jfloat > *, jint, jint);
static JArray< jint > * copyOf(JArray< jint > *, jint);
static JArray< jint > * copyOfRange(JArray< jint > *, jint, jint);
static JArray< jlong > * copyOf(JArray< jlong > *, jint);
static JArray< jlong > * copyOfRange(JArray< jlong > *, jint, jint);
static JArray< jshort > * copyOf(JArray< jshort > *, jint);
static JArray< jshort > * copyOfRange(JArray< jshort > *, jint, jint);
static JArray< ::java::lang::Object * > * copyOf(JArray< ::java::lang::Object * > *, jint);
static JArray< ::java::lang::Object * > * copyOfRange(JArray< ::java::lang::Object * > *, jint, jint);
static JArray< ::java::lang::Object * > * copyOf(JArray< ::java::lang::Object * > *, jint, ::java::lang::Class *);
static JArray< ::java::lang::Object * > * copyOfRange(JArray< ::java::lang::Object * > *, jint, jint, ::java::lang::Class *);
static ::java::lang::Class class$;
};

View file

@ -73,6 +73,8 @@ private:
void writeObject(::java::io::ObjectOutputStream *);
void readObject(::java::io::ObjectInputStream *);
public:
virtual ::java::lang::String * getDisplayName(jint, jint, ::java::util::Locale *);
virtual ::java::util::Map * getDisplayNames(jint, jint, ::java::util::Locale *);
virtual jint compareTo(::java::lang::Object *);
static const jint ERA = 0;
static const jint YEAR = 1;
@ -115,6 +117,9 @@ public:
static const jint UNDECIMBER = 12;
static const jint AM = 0;
static const jint PM = 1;
static const jint ALL_STYLES = 0;
static const jint SHORT = 1;
static const jint LONG = 2;
public: // actually protected
JArray< jint > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) fields;
JArray< jboolean > * isSet__;

View file

@ -43,9 +43,12 @@ import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.text.DateFormatSymbols;
/**
* This class is an abstract base class for Calendars, which can be
* used to convert between <code>Date</code> objects and a set of
@ -99,6 +102,20 @@ day_of_week + week_of_year</pre>
* specific field by one, propagating overflows), or
* <code>add</code>ing/substracting a fixed amount to a field.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
* @author Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.de)
* @author Warren Levy (warrenl@cygnus.com)
* @author Jeff Sturm (jsturm@one-point.com)
* @author Tom Tromey (tromey@redhat.com)
* @author Bryce McKinlay (mckinlay@redhat.com)
* @author Ingo Proetel (proetel@aicas.com)
* @author Jerry Quinn (jlquinn@optonline.net)
* @author Jeroen Frijters (jeroen@frijters.net)
* @author Noa Resare (noa@resare.com)
* @author Sven de Marothy (sven@physto.se)
* @author David Gilbert (david.gilbert@object-refinery.com)
* @author Olivier Jolly (olivier.jolly@pcedev.com)
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @see Date
* @see GregorianCalendar
* @see TimeZone
@ -325,6 +342,34 @@ public abstract class Calendar
*/
public static final int PM = 1;
/**
* A style specifier for {@link #getDisplayNames(int,int,Locale)}
* stating that names should be returned in both long and short variants.
*
* @since 1.6
* @see #SHORT
* @see #LONG
*/
public static final int ALL_STYLES = 0;
/**
* A style specifier for {@link #getDisplayName(int,int,Locale)}
* and {@link #getDisplayNames(int,int,Locale)} stating that names
* should be returned in their short variant if applicable.
*
* @since 1.6
*/
public static final int SHORT = 1;
/**
* A style specifier for {@link #getDisplayName(int,int,Locale)}
* and {@link #getDisplayNames(int,int,Locale)} stating that names
* should be returned in their long variant if applicable.
*
* @since 1.6
*/
public static final int LONG = 2;
/**
* The time fields. The array is indexed by the constants YEAR to
* DST_OFFSET.
@ -504,7 +549,7 @@ public abstract class Calendar
* Cache of locale->calendar-class mappings. This avoids having to do a ResourceBundle
* lookup for every getInstance call.
*/
private static HashMap cache = new HashMap();
private static HashMap<Locale,Class> cache = new HashMap<Locale,Class>();
/** Preset argument types for calendar-class constructor lookup. */
private static Class[] ctorArgTypes = new Class[]
@ -526,7 +571,7 @@ public abstract class Calendar
*/
public static synchronized Calendar getInstance(TimeZone zone, Locale locale)
{
Class calendarClass = (Class) cache.get(locale);
Class calendarClass = cache.get(locale);
Throwable exception = null;
try
@ -1326,4 +1371,205 @@ public abstract class Calendar
areFieldsSet = false;
}
}
/**
* Returns a localised textual representation of the current value
* of the given field using the specified style. If there is no
* applicable textual representation (e.g. the field has a numeric
* value), then <code>null</code> is returned. If one does exist,
* then the value is obtained from {@link #get(int)} and converted
* appropriately. For example, if the <code>MONTH</code> field is
* requested, then <code>get(MONTH)</code> is called. This is then
* converted to a textual representation based on its value and
* the style requested; if the <code>LONG</code> style is requested
* and the returned value is <code>11</code> from a
* {@link GregorianCalendar} implementation, then <code>"December"</code>
* is returned. By default, a textual representation is available
* for all fields which have an applicable value obtainable from
* {@link java.text.DateFormatSymbols}.
*
* @param field the calendar field whose textual representation should
* be obtained.
* @param style the style to use; either {@link #LONG} or {@link #SHORT}.
* @param locale the locale to use for translation.
* @return the textual representation of the given field in the specified
* style, or <code>null</code> if none is applicable.
* @throws IllegalArgumentException if <code>field</code> or <code>style</code>
* or invalid, or the calendar is non-lenient
* and has invalid values.
* @throws NullPointerException if <code>locale</code> is <code>null</code>.
* @since 1.6
*/
public String getDisplayName(int field, int style, Locale locale)
{
if (field < 0 || field >= FIELD_COUNT)
throw new IllegalArgumentException("The field value, " + field +
", is invalid.");
if (style != SHORT && style != LONG)
throw new IllegalArgumentException("The style must be either " +
"short or long.");
if (field == YEAR || field == WEEK_OF_YEAR ||
field == WEEK_OF_MONTH || field == DAY_OF_MONTH ||
field == DAY_OF_YEAR || field == DAY_OF_WEEK_IN_MONTH ||
field == HOUR || field == HOUR_OF_DAY || field == MINUTE ||
field == SECOND || field == MILLISECOND)
return null;
int value = get(field);
DateFormatSymbols syms = DateFormatSymbols.getInstance(locale);
if (field == ERA)
return syms.getEras()[value];
if (field == MONTH)
if (style == LONG)
return syms.getMonths()[value];
else
return syms.getShortMonths()[value];
if (field == DAY_OF_WEEK)
if (style == LONG)
return syms.getWeekdays()[value];
else
return syms.getShortWeekdays()[value];
if (field == AM_PM)
return syms.getAmPmStrings()[value];
if (field == ZONE_OFFSET)
if (style == LONG)
return syms.getZoneStrings()[value][1];
else
return syms.getZoneStrings()[value][2];
if (field == DST_OFFSET)
if (style == LONG)
return syms.getZoneStrings()[value][3];
else
return syms.getZoneStrings()[value][4];
throw new InternalError("Failed to resolve field " + field +
" with style " + style + " for locale " +
locale);
}
/**
* Returns a map linking all specified textual representations
* of the given field to their numerical values. The textual
* representations included are determined by the specified
* style and locale. For example, if the style <code>LONG</code>
* is specified and the German locale, then the map will
* contain "Montag" to {@link #MONDAY}, "Dienstag" to
* {@link #TUESDAY}, "Mittwoch" to {@link #WEDNESDAY} and
* so on. The default implementation uses the values returned
* by {@link DateFormatSymbols} so, for example, the style
* {@link #ALL_STYLES} and the field {@link #MONTH} will return
* a map filled with the values returned from
* {@link DateFormatSymbols#getMonths()} and
* {@link DateFormatSymbols#getShortMonths()}. If there are
* no textual representations for a given field (usually because
* it is purely numeric, such as the year in the
* {@link GregorianCalendar}), <code>null</code> is returned.
*
* @param field the calendar field whose textual representation should
* be obtained.
* @param style the style to use; either {@link #LONG}, {@link #SHORT}
* or {@link ALL_STYLES}.
* @param locale the locale to use for translation.
* @return a map of the textual representations of the given field in the
* specified style to their numeric values, or <code>null</code>
* if none is applicable.
* @throws IllegalArgumentException if <code>field</code> or <code>style</code>
* or invalid, or the calendar is non-lenient
* and has invalid values.
* @throws NullPointerException if <code>locale</code> is <code>null</code>.
* @since 1.6
*/
public Map<String,Integer> getDisplayNames(int field, int style, Locale locale)
{
if (field < 0 || field >= FIELD_COUNT)
throw new IllegalArgumentException("The field value, " + field +
", is invalid.");
if (style != SHORT && style != LONG && style != ALL_STYLES)
throw new IllegalArgumentException("The style must be either " +
"short, long or all styles.");
if (field == YEAR || field == WEEK_OF_YEAR ||
field == WEEK_OF_MONTH || field == DAY_OF_MONTH ||
field == DAY_OF_YEAR || field == DAY_OF_WEEK_IN_MONTH ||
field == HOUR || field == HOUR_OF_DAY || field == MINUTE ||
field == SECOND || field == MILLISECOND)
return null;
DateFormatSymbols syms = DateFormatSymbols.getInstance(locale);
Map<String,Integer> map = new HashMap<String,Integer>();
if (field == ERA)
{
String[] eras = syms.getEras();
for (int a = 0; a < eras.length; ++a)
map.put(eras[a], a);
return map;
}
if (field == MONTH)
{
if (style == LONG || style == ALL_STYLES)
{
String[] months = syms.getMonths();
for (int a = 0; a < months.length; ++a)
map.put(months[a], a);
}
if (style == SHORT || style == ALL_STYLES)
{
String[] months = syms.getShortMonths();
for (int a = 0; a < months.length; ++a)
map.put(months[a], a);
}
return map;
}
if (field == DAY_OF_WEEK)
{
if (style == LONG || style == ALL_STYLES)
{
String[] weekdays = syms.getWeekdays();
for (int a = SUNDAY; a < weekdays.length; ++a)
map.put(weekdays[a], a);
}
if (style == SHORT || style == ALL_STYLES)
{
String[] weekdays = syms.getShortWeekdays();
for (int a = SUNDAY; a < weekdays.length; ++a)
map.put(weekdays[a], a);
}
return map;
}
if (field == AM_PM)
{
String[] ampms = syms.getAmPmStrings();
for (int a = 0; a < ampms.length; ++a)
map.put(ampms[a], a);
return map;
}
if (field == ZONE_OFFSET)
{
String[][] zones = syms.getZoneStrings();
for (int a = 0; a < zones.length; ++a)
{
if (style == LONG || style == ALL_STYLES)
map.put(zones[a][1], a);
if (style == SHORT || style == ALL_STYLES)
map.put(zones[a][2], a);
}
return map;
}
if (field == DST_OFFSET)
{
String[][] zones = syms.getZoneStrings();
for (int a = 0; a < zones.length; ++a)
{
if (style == LONG || style == ALL_STYLES)
map.put(zones[a][3], a);
if (style == SHORT || style == ALL_STYLES)
map.put(zones[a][4], a);
}
return map;
}
throw new InternalError("Failed to resolve field " + field +
" with style " + style + " for locale " +
locale);
}
}

View file

@ -0,0 +1,31 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_Collections$LIFOQueue__
#define __java_util_Collections$LIFOQueue__
#pragma interface
#include <java/util/AbstractQueue.h>
class java::util::Collections$LIFOQueue : public ::java::util::AbstractQueue
{
public:
Collections$LIFOQueue(::java::util::Deque *);
virtual jboolean add(::java::lang::Object *);
virtual jboolean addAll(::java::util::Collection *);
virtual void clear();
virtual jboolean isEmpty();
virtual ::java::util::Iterator * iterator();
virtual jboolean offer(::java::lang::Object *);
virtual ::java::lang::Object * peek();
virtual ::java::lang::Object * poll();
virtual jint size();
private:
::java::util::Deque * __attribute__((aligned(__alignof__( ::java::util::AbstractQueue)))) deque;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_Collections$LIFOQueue__

View file

@ -0,0 +1,30 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_Collections$MapSet__
#define __java_util_Collections$MapSet__
#pragma interface
#include <java/util/AbstractSet.h>
class java::util::Collections$MapSet : public ::java::util::AbstractSet
{
public:
Collections$MapSet(::java::util::Map *);
virtual jboolean add(::java::lang::Object *);
virtual jboolean addAll(::java::util::Collection *);
virtual void clear();
virtual jboolean contains(::java::lang::Object *);
virtual jboolean isEmpty();
virtual ::java::util::Iterator * iterator();
virtual jboolean remove(::java::lang::Object *);
virtual jint size();
private:
::java::util::Map * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) map;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_Collections$MapSet__

View file

@ -17,9 +17,8 @@ public: // actually package-private
Collections$UnmodifiableMap$UnmodifiableEntrySet(::java::util::Set *);
public:
::java::util::Iterator * iterator();
JArray< ::java::util::Map$Entry * > * Collections$UnmodifiableMap$UnmodifiableEntrySet$toArray();
JArray< ::java::lang::Object * > * toArray(JArray< ::java::lang::Object * > *);
JArray< ::java::lang::Object * > * toArray();
JArray< ::java::lang::Object * > * toArray(JArray< ::java::lang::Object * > *);
private:
static const jlong serialVersionUID = 7854390611657943733LL;
public:

View file

@ -69,6 +69,8 @@ public:
static ::java::util::Set * checkedSet(::java::util::Set *, ::java::lang::Class *);
static ::java::util::SortedMap * checkedSortedMap(::java::util::SortedMap *, ::java::lang::Class *, ::java::lang::Class *);
static ::java::util::SortedSet * checkedSortedSet(::java::util::SortedSet *, ::java::lang::Class *);
static ::java::util::Queue * asLifoQueue(::java::util::Deque *);
static ::java::util::Set * newSetFromMap(::java::util::Map *);
private:
static const jint LARGE_LIST_SIZE = 16;
public:

View file

@ -0,0 +1,33 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_LinkedList$1__
#define __java_util_LinkedList$1__
#pragma interface
#include <java/lang/Object.h>
class java::util::LinkedList$1 : public ::java::lang::Object
{
public: // actually package-private
LinkedList$1(::java::util::LinkedList *);
private:
void checkMod();
public:
jboolean hasNext();
::java::lang::Object * next();
void remove();
private:
jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) knownMod;
::java::util::LinkedList$Entry * next__;
::java::util::LinkedList$Entry * lastReturned;
jint position;
public: // actually package-private
::java::util::LinkedList * this$0;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_LinkedList$1__

View file

@ -56,6 +56,19 @@ public:
private:
void writeObject(::java::io::ObjectOutputStream *);
void readObject(::java::io::ObjectInputStream *);
public:
virtual ::java::util::Iterator * descendingIterator();
virtual jboolean offerFirst(::java::lang::Object *);
virtual jboolean offerLast(::java::lang::Object *);
virtual ::java::lang::Object * peekFirst();
virtual ::java::lang::Object * peekLast();
virtual ::java::lang::Object * pollFirst();
virtual ::java::lang::Object * pollLast();
virtual ::java::lang::Object * pop();
virtual void push(::java::lang::Object *);
virtual jboolean removeFirstOccurrence(::java::lang::Object *);
virtual jboolean removeLastOccurrence(::java::lang::Object *);
private:
static const jlong serialVersionUID = 876323262645176354LL;
public: // actually package-private
::java::util::LinkedList$Entry * __attribute__((aligned(__alignof__( ::java::util::AbstractSequentialList)))) first;

View file

@ -26,6 +26,9 @@ public:
static JArray< ::java::util::Locale * > * getAvailableLocales();
static JArray< ::java::lang::String * > * getISOCountries();
static JArray< ::java::lang::String * > * getISOLanguages();
private:
static JArray< ::java::lang::String * > * getISOStrings(::java::lang::String *);
public:
::java::lang::String * getLanguage();
::java::lang::String * getCountry();
::java::lang::String * getVariant();
@ -68,13 +71,18 @@ public:
static ::java::util::Locale * US;
static ::java::util::Locale * CANADA;
static ::java::util::Locale * CANADA_FRENCH;
static ::java::util::Locale * ROOT;
private:
static const jlong serialVersionUID = 9149081749638150636LL;
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) language;
::java::lang::String * country;
::java::lang::String * variant;
jint hashcode;
static JArray< ::java::util::Locale * > * availableLocales;
static ::java::util::HashMap * localeMap;
static ::java::util::Locale * defaultLocale;
static JArray< ::java::lang::String * > * languageCache;
static JArray< ::java::lang::String * > * countryCache;
public:
static ::java::lang::Class class$;
};

View file

@ -1,864 +0,0 @@
/* Locale.java -- i18n locales
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2006 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 java.util;
import gnu.classpath.SystemProperties;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
/**
* Locales represent a specific country and culture. Classes which can be
* passed a Locale object tailor their information for a given locale. For
* instance, currency number formatting is handled differently for the USA
* and France.
*
* <p>Locales are made up of a language code, a country code, and an optional
* set of variant strings. Language codes are represented by
* <a href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt">
* ISO 639:1988</a> w/ additions from ISO 639/RA Newsletter No. 1/1989
* and a decision of the Advisory Committee of ISO/TC39 on August 8, 1997.
*
* <p>Country codes are represented by
* <a href="http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html">
* ISO 3166</a>. Variant strings are vendor and browser specific. Standard
* variant strings include "POSIX" for POSIX, "WIN" for MS-Windows, and
* "MAC" for Macintosh. When there is more than one variant string, they must
* be separated by an underscore (U+005F).
*
* <p>The default locale is determined by the values of the system properties
* user.language, user.region, and user.variant, defaulting to "en". Note that
* the locale does NOT contain the conversion and formatting capabilities (for
* that, use ResourceBundle and java.text). Rather, it is an immutable tag
* object for identifying a given locale, which is referenced by these other
* classes when they must make locale-dependent decisions.
*
* @see ResourceBundle
* @see java.text.Format
* @see java.text.NumberFormat
* @see java.text.Collator
* @author Jochen Hoenicke
* @author Paul Fisher
* @author Eric Blake (ebb9@email.byu.edu)
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.1
* @status updated to 1.4
*/
public final class Locale implements Serializable, Cloneable
{
/** Locale which represents the English language. */
public static final Locale ENGLISH = getLocale("en");
/** Locale which represents the French language. */
public static final Locale FRENCH = getLocale("fr");
/** Locale which represents the German language. */
public static final Locale GERMAN = getLocale("de");
/** Locale which represents the Italian language. */
public static final Locale ITALIAN = getLocale("it");
/** Locale which represents the Japanese language. */
public static final Locale JAPANESE = getLocale("ja");
/** Locale which represents the Korean language. */
public static final Locale KOREAN = getLocale("ko");
/** Locale which represents the Chinese language. */
public static final Locale CHINESE = getLocale("zh");
/** Locale which represents the Chinese language as used in China. */
public static final Locale SIMPLIFIED_CHINESE = getLocale("zh", "CN");
/**
* Locale which represents the Chinese language as used in Taiwan.
* Same as TAIWAN Locale.
*/
public static final Locale TRADITIONAL_CHINESE = getLocale("zh", "TW");
/** Locale which represents France. */
public static final Locale FRANCE = getLocale("fr", "FR");
/** Locale which represents Germany. */
public static final Locale GERMANY = getLocale("de", "DE");
/** Locale which represents Italy. */
public static final Locale ITALY = getLocale("it", "IT");
/** Locale which represents Japan. */
public static final Locale JAPAN = getLocale("ja", "JP");
/** Locale which represents Korea. */
public static final Locale KOREA = getLocale("ko", "KR");
/**
* Locale which represents China.
* Same as SIMPLIFIED_CHINESE Locale.
*/
public static final Locale CHINA = SIMPLIFIED_CHINESE;
/**
* Locale which represents the People's Republic of China.
* Same as CHINA Locale.
*/
public static final Locale PRC = CHINA;
/**
* Locale which represents Taiwan.
* Same as TRADITIONAL_CHINESE Locale.
*/
public static final Locale TAIWAN = TRADITIONAL_CHINESE;
/** Locale which represents the United Kingdom. */
public static final Locale UK = getLocale("en", "GB");
/** Locale which represents the United States. */
public static final Locale US = getLocale("en", "US");
/** Locale which represents the English speaking portion of Canada. */
public static final Locale CANADA = getLocale("en", "CA");
/** Locale which represents the French speaking portion of Canada. */
public static final Locale CANADA_FRENCH = getLocale("fr", "CA");
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 9149081749638150636L;
/**
* The language code, as returned by getLanguage().
*
* @serial the languange, possibly ""
*/
private String language;
/**
* The country code, as returned by getCountry().
*
* @serial the country, possibly ""
*/
private String country;
/**
* The variant code, as returned by getVariant().
*
* @serial the variant, possibly ""
*/
private String variant;
/**
* This is the cached hashcode. When writing to stream, we write -1.
*
* @serial should be -1 in serial streams
*/
private int hashcode;
/**
* The default locale. Except for during bootstrapping, this should never be
* null. Note the logic in the main constructor, to detect when
* bootstrapping has completed.
*/
private static Locale defaultLocale =
getLocale(SystemProperties.getProperty("user.language", "en"),
SystemProperties.getProperty("user.region", ""),
SystemProperties.getProperty("user.variant", ""));
/**
* Retrieves the locale with the specified language from the cache.
*
* @param language the language of the locale to retrieve.
* @return the locale.
*/
private static Locale getLocale(String language)
{
return getLocale(language, "", "");
}
/**
* Retrieves the locale with the specified language and region
* from the cache.
*
* @param language the language of the locale to retrieve.
* @param region the region of the locale to retrieve.
* @return the locale.
*/
private static Locale getLocale(String language, String region)
{
return getLocale(language, region, "");
}
/**
* Retrieves the locale with the specified language, region
* and variant from the cache.
*
* @param language the language of the locale to retrieve.
* @param region the region of the locale to retrieve.
* @param variant the variant of the locale to retrieve.
* @return the locale.
*/
private static Locale getLocale(String language, String region, String variant)
{
return new Locale(language, region, variant);
}
/**
* Convert new iso639 codes to the old ones.
*
* @param language the language to check
* @return the appropriate code
*/
private String convertLanguage(String language)
{
if (language.equals(""))
return language;
language = language.toLowerCase();
int index = "he,id,yi".indexOf(language);
if (index != -1)
return "iw,in,ji".substring(index, index + 2);
return language;
}
/**
* Creates a new locale for the given language and country.
*
* @param language lowercase two-letter ISO-639 A2 language code
* @param country uppercase two-letter ISO-3166 A2 contry code
* @param variant vendor and browser specific
* @throws NullPointerException if any argument is null
*/
public Locale(String language, String country, String variant)
{
// During bootstrap, we already know the strings being passed in are
// the correct capitalization, and not null. We can't call
// String.toUpperCase during this time, since that depends on the
// default locale.
if (defaultLocale != null)
{
language = convertLanguage(language).intern();
country = country.toUpperCase().intern();
variant = variant.intern();
}
this.language = language;
this.country = country;
this.variant = variant;
hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
}
/**
* Creates a new locale for the given language and country.
*
* @param language lowercase two-letter ISO-639 A2 language code
* @param country uppercase two-letter ISO-3166 A2 country code
* @throws NullPointerException if either argument is null
*/
public Locale(String language, String country)
{
this(language, country, "");
}
/**
* Creates a new locale for a language.
*
* @param language lowercase two-letter ISO-639 A2 language code
* @throws NullPointerException if either argument is null
* @since 1.4
*/
public Locale(String language)
{
this(language, "", "");
}
/**
* Returns the default Locale. The default locale is generally once set
* on start up and then never changed. Normally you should use this locale
* for everywhere you need a locale. The initial setting matches the
* default locale, the user has chosen.
*
* @return the default locale for this virtual machine
*/
public static Locale getDefault()
{
return defaultLocale;
}
/**
* Changes the default locale. Normally only called on program start up.
* Note that this doesn't change the locale for other programs. This has
* a security check,
* <code>PropertyPermission("user.language", "write")</code>, because of
* its potential impact to running code.
*
* @param newLocale the new default locale
* @throws NullPointerException if newLocale is null
* @throws SecurityException if permission is denied
*/
public static void setDefault(Locale newLocale)
{
if (newLocale == null)
throw new NullPointerException();
SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPermission(new PropertyPermission("user.language", "write"));
defaultLocale = newLocale;
}
/**
* Returns the list of available locales.
*
* @return the installed locales
*/
public static Locale[] getAvailableLocales()
{
/* I only return those for which localized language
* or country information exists.
* XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4
* has 148 installed locales!).
*/
return new Locale[]
{
ENGLISH, FRENCH, GERMAN, new Locale("ga", "")
};
}
/**
* Returns a list of all 2-letter uppercase country codes as defined
* in ISO 3166.
*
* @return a list of acceptable country codes
*/
public static String[] getISOCountries()
{
return new String[]
{
"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS",
"AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI",
"BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA",
"CC", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU",
"CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE",
"EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "FX",
"GA", "GB", "GD", "GE", "GF", "GH", "GI", "GL", "GM", "GN", "GP", "GQ",
"GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU",
"ID", "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP",
"KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA",
"LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC",
"MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS",
"MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG",
"NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG",
"PH", "PK", "PL", "PM", "PN", "PR", "PT", "PW", "PY", "QA", "RE", "RO",
"RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK",
"SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF",
"TG", "TH", "TJ", "TK", "TM", "TN", "TO", "TP", "TR", "TT", "TV", "TW",
"TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI",
"VN", "VU", "WF", "WS", "YE", "YT", "YU", "ZA", "ZM", "ZR", "ZW"
};
}
/**
* Returns a list of all 2-letter lowercase language codes as defined
* in ISO 639 (both old and new variant).
*
* @return a list of acceptable language codes
*/
public static String[] getISOLanguages()
{
return new String[]
{
"aa", "ab", "af", "am", "ar", "as", "ay", "az", "ba", "be", "bg", "bh",
"bi", "bn", "bo", "br", "ca", "co", "cs", "cy", "da", "de", "dz", "el",
"en", "eo", "es", "et", "eu", "fa", "fi", "fj", "fo", "fr", "fy", "ga",
"gd", "gl", "gn", "gu", "ha", "he", "hi", "hr", "hu", "hy", "ia", "id",
"ie", "ik", "in", "is", "it", "iu", "iw", "ja", "ji", "jw", "ka", "kk",
"kl", "km", "kn", "ko", "ks", "ku", "ky", "la", "ln", "lo", "lt", "lv",
"mg", "mi", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "na", "ne",
"nl", "no", "oc", "om", "or", "pa", "pl", "ps", "pt", "qu", "rm", "rn",
"ro", "ru", "rw", "sa", "sd", "sg", "sh", "si", "sk", "sl", "sm", "sn",
"so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th",
"ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ug", "uk", "ur",
"uz", "vi", "vo", "wo", "xh", "yi", "yo", "za", "zh", "zu"
};
}
/**
* Returns the language code of this locale. Some language codes have changed
* as ISO 639 has evolved; this returns the old name, even if you built
* the locale with the new one.
*
* @return language code portion of this locale, or an empty String
*/
public String getLanguage()
{
return language;
}
/**
* Returns the country code of this locale.
*
* @return country code portion of this locale, or an empty String
*/
public String getCountry()
{
return country;
}
/**
* Returns the variant code of this locale.
*
* @return the variant code portion of this locale, or an empty String
*/
public String getVariant()
{
return variant;
}
/**
* Gets the string representation of the current locale. This consists of
* the language, the country, and the variant, separated by an underscore.
* The variant is listed only if there is a language or country. Examples:
* "en", "de_DE", "_GB", "en_US_WIN", "de__POSIX", "fr__MAC".
*
* @return the string representation of this Locale
* @see #getDisplayName()
*/
public String toString()
{
if (language.length() == 0 && country.length() == 0)
return "";
else if (country.length() == 0 && variant.length() == 0)
return language;
StringBuffer result = new StringBuffer(language);
result.append('_').append(country);
if (variant.length() != 0)
result.append('_').append(variant);
return result.toString();
}
/**
* Returns the three-letter ISO language abbrevation of this locale.
*
* @throws MissingResourceException if the three-letter code is not known
*/
public String getISO3Language()
{
// We know all strings are interned so we can use '==' for better performance.
if (language == "")
return "";
int index
= ("aa,ab,af,am,ar,as,ay,az,ba,be,bg,bh,bi,bn,bo,br,ca,co,cs,cy,da,"
+ "de,dz,el,en,eo,es,et,eu,fa,fi,fj,fo,fr,fy,ga,gd,gl,gn,gu,ha,iw,"
+ "hi,hr,hu,hy,ia,in,ie,ik,in,is,it,iu,iw,ja,ji,jw,ka,kk,kl,km,kn,"
+ "ko,ks,ku,ky,la,ln,lo,lt,lv,mg,mi,mk,ml,mn,mo,mr,ms,mt,my,na,ne,"
+ "nl,no,oc,om,or,pa,pl,ps,pt,qu,rm,rn,ro,ru,rw,sa,sd,sg,sh,si,sk,"
+ "sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,ta,te,tg,th,ti,tk,tl,tn,to,tr,"
+ "ts,tt,tw,ug,uk,ur,uz,vi,vo,wo,xh,ji,yo,za,zh,zu")
.indexOf(language);
if (index % 3 != 0 || language.length() != 2)
throw new MissingResourceException
("Can't find ISO3 language for " + language,
"java.util.Locale", language);
// Don't read this aloud. These are the three letter language codes.
return
("aarabkaframharaasmaymazebakbelbulbihbisbenbodbrecatcoscescymdandeu"
+ "dzoellengepospaesteusfasfinfijfaofrafrygaigdhglggrngujhauhebhinhrv"
+ "hunhyeinaindileipkindislitaikuhebjpnyidjawkatkazkalkhmkankorkaskur"
+ "kirlatlinlaolitlavmlgmrimkdmalmonmolmarmsamltmyanaunepnldnorociorm"
+ "oripanpolpusporquerohrunronruskinsansndsagsrpsinslkslvsmosnasomsqi"
+ "srpsswsotsunsweswatamteltgkthatirtuktgltsntonturtsotattwiuigukrurd"
+ "uzbvievolwolxhoyidyorzhazhozul")
.substring(index, index + 3);
}
/**
* Returns the three-letter ISO country abbrevation of the locale.
*
* @throws MissingResourceException if the three-letter code is not known
*/
public String getISO3Country()
{
// We know all strings are interned so we can use '==' for better performance.
if (country == "")
return "";
int index
= ("AD,AE,AF,AG,AI,AL,AM,AN,AO,AQ,AR,AS,AT,AU,AW,AZ,BA,BB,BD,BE,BF,"
+ "BG,BH,BI,BJ,BM,BN,BO,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CF,CG,CH,CI,CK,"
+ "CL,CM,CN,CO,CR,CU,CV,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,"
+ "ES,ET,FI,FJ,FK,FM,FO,FR,FX,GA,GB,GD,GE,GF,GH,GI,GL,GM,GN,GP,GQ,"
+ "GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IN,IO,IQ,IR,IS,IT,"
+ "JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,"
+ "LT,LU,LV,LY,MA,MC,MD,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,"
+ "MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,"
+ "PH,PK,PL,PM,PN,PR,PT,PW,PY,QA,RE,RO,RU,RW,SA,SB,SC,SD,SE,SG,SH,"
+ "SI,SJ,SK,SL,SM,SN,SO,SR,ST,SV,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TM,TN,"
+ "TO,TP,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,"
+ "WS,YE,YT,YU,ZA,ZM,ZR,ZW")
.indexOf(country);
if (index % 3 != 0 || country.length() != 2)
throw new MissingResourceException
("Can't find ISO3 country for " + country,
"java.util.Locale", country);
// Don't read this aloud. These are the three letter country codes.
return
("ANDAREAFGATGAIAALBARMANTAGOATAARGASMAUTAUSABWAZEBIHBRBBGDBELBFABGR"
+ "BHRBDIBENBMUBRNBOLBRABHSBTNBVTBWABLRBLZCANCCKCAFCOGCHECIVCOKCHLCMR"
+ "CHNCOLCRICUBCPVCXRCYPCZEDEUDJIDNKDMADOMDZAECUESTEGYESHERIESPETHFIN"
+ "FJIFLKFSMFROFRAFXXGABGBRGRDGEOGUFGHAGIBGRLGMBGINGLPGNQGRCSGSGTMGUM"
+ "GNBGUYHKGHMDHNDHRVHTIHUNIDNIRLISRINDIOTIRQIRNISLITAJAMJORJPNKENKGZ"
+ "KHMKIRCOMKNAPRKKORKWTCYMKAZLAOLBNLCALIELKALBRLSOLTULUXLVALBYMARMCO"
+ "MDAMDGMHLMKDMLIMMRMNGMACMNPMTQMRTMSRMLTMUSMDVMWIMEXMYSMOZNAMNCLNER"
+ "NFKNGANICNLDNORNPLNRUNIUNZLOMNPANPERPYFPNGPHLPAKPOLSPMPCNPRIPRTPLW"
+ "PRYQATREUROMRUSRWASAUSLBSYCSDNSWESGPSHNSVNSJMSVKSLESMRSENSOMSURSTP"
+ "SLVSYRSWZTCATCDATFTGOTHATJKTKLTKMTUNTONTMPTURTTOTUVTWNTZAUKRUGAUMI"
+ "USAURYUZBVATVCTVENVGBVIRVNMVUTWLFWSMYEMMYTYUGZAFZMBZARZWE")
.substring(index, index + 3);
}
/**
* Gets the country name suitable for display to the user, formatted
* for the default locale. This has the same effect as
* <pre>
* getDisplayLanguage(Locale.getDefault());
* </pre>
*
* @return the language name of this locale localized to the default locale,
* with the ISO code as backup
*/
public String getDisplayLanguage()
{
return getDisplayLanguage(defaultLocale);
}
/**
* <p>
* Gets the name of the language specified by this locale, in a form suitable
* for display to the user. If possible, the display name will be localized
* to the specified locale. For example, if the locale instance is
* <code>Locale.GERMANY</code>, and the specified locale is <code>Locale.UK</code>,
* the result would be 'German'. Using the German locale would instead give
* 'Deutsch'. If the display name can not be localized to the supplied
* locale, it will fall back on other output in the following order:
* </p>
* <ul>
* <li>the display name in the default locale</li>
* <li>the display name in English</li>
* <li>the ISO code</li>
* </ul>
* <p>
* If the language is unspecified by this locale, then the empty string is
* returned.
* </p>
*
* @param inLocale the locale to use for formatting the display string.
* @return the language name of this locale localized to the given locale,
* with the default locale, English and the ISO code as backups.
* @throws NullPointerException if the supplied locale is null.
*/
public String getDisplayLanguage(Locale inLocale)
{
try
{
ResourceBundle bundle
= ResourceBundle.getBundle("gnu.java.locale.iso639", inLocale);
return bundle.getString(language);
}
catch (MissingResourceException ex)
{
return language;
}
}
/**
* Returns the country name of this locale localized to the
* default locale. If the localized is not found, the ISO code
* is returned. This has the same effect as
* <pre>
* getDisplayCountry(Locale.getDefault());
* </pre>
*
* @return the country name of this locale localized to the given locale,
* with the ISO code as backup
*/
public String getDisplayCountry()
{
return getDisplayCountry(defaultLocale);
}
/**
* <p>
* Gets the name of the country specified by this locale, in a form suitable
* for display to the user. If possible, the display name will be localized
* to the specified locale. For example, if the locale instance is
* <code>Locale.GERMANY</code>, and the specified locale is <code>Locale.UK</code>,
* the result would be 'Germany'. Using the German locale would instead give
* 'Deutschland'. If the display name can not be localized to the supplied
* locale, it will fall back on other output in the following order:
* </p>
* <ul>
* <li>the display name in the default locale</li>
* <li>the display name in English</li>
* <li>the ISO code</li>
* </ul>
* <p>
* If the country is unspecified by this locale, then the empty string is
* returned.
* </p>
*
* @param inLocale the locale to use for formatting the display string.
* @return the country name of this locale localized to the given locale,
* with the default locale, English and the ISO code as backups.
* @throws NullPointerException if the supplied locale is null.
*/
public String getDisplayCountry(Locale inLocale)
{
try
{
ResourceBundle bundle =
ResourceBundle.getBundle("gnu.java.locale.iso3166", inLocale);
return bundle.getString(country);
}
catch (MissingResourceException ex)
{
return country;
}
}
/**
* Returns the variant name of this locale localized to the
* default locale. If the localized is not found, the variant code
* itself is returned. This has the same effect as
* <pre>
* getDisplayVariant(Locale.getDefault());
* </pre>
*
* @return the variant code of this locale localized to the given locale,
* with the ISO code as backup
*/
public String getDisplayVariant()
{
return getDisplayVariant(defaultLocale);
}
/**
* <p>
* Gets the name of the variant specified by this locale, in a form suitable
* for display to the user. If possible, the display name will be localized
* to the specified locale. For example, if the locale instance is a revised
* variant, and the specified locale is <code>Locale.UK</code>, the result
* would be 'REVISED'. Using the German locale would instead give
* 'Revidiert'. If the display name can not be localized to the supplied
* locale, it will fall back on other output in the following order:
* </p>
* <ul>
* <li>the display name in the default locale</li>
* <li>the display name in English</li>
* <li>the ISO code</li>
* </ul>
* <p>
* If the variant is unspecified by this locale, then the empty string is
* returned.
* </p>
*
* @param inLocale the locale to use for formatting the display string.
* @return the variant name of this locale localized to the given locale,
* with the default locale, English and the ISO code as backups.
* @throws NullPointerException if the supplied locale is null.
*/
public String getDisplayVariant(Locale inLocale)
{
// XXX - load a bundle?
return variant;
}
/**
* Gets all local components suitable for display to the user, formatted
* for the default locale. For the language component, getDisplayLanguage
* is called. For the country component, getDisplayCountry is called.
* For the variant set component, getDisplayVariant is called.
*
* <p>The returned String will be one of the following forms:<br>
* <pre>
* language (country, variant)
* language (country)
* language (variant)
* country (variant)
* language
* country
* variant
* </pre>
*
* @return String version of this locale, suitable for display to the user
*/
public String getDisplayName()
{
return getDisplayName(defaultLocale);
}
/**
* Gets all local components suitable for display to the user, formatted
* for a specified locale. For the language component,
* getDisplayLanguage(Locale) is called. For the country component,
* getDisplayCountry(Locale) is called. For the variant set component,
* getDisplayVariant(Locale) is called.
*
* <p>The returned String will be one of the following forms:<br>
* <pre>
* language (country, variant)
* language (country)
* language (variant)
* country (variant)
* language
* country
* variant
* </pre>
*
* @param locale locale to use for formatting
* @return String version of this locale, suitable for display to the user
*/
public String getDisplayName(Locale locale)
{
StringBuffer result = new StringBuffer();
int count = 0;
String[] delimiters = {"", " (", ","};
if (language.length() != 0)
{
result.append(delimiters[count++]);
result.append(getDisplayLanguage(locale));
}
if (country.length() != 0)
{
result.append(delimiters[count++]);
result.append(getDisplayCountry(locale));
}
if (variant.length() != 0)
{
result.append(delimiters[count++]);
result.append(getDisplayVariant(locale));
}
if (count > 1)
result.append(")");
return result.toString();
}
/**
* Does the same as <code>Object.clone()</code> but does not throw
* a <code>CloneNotSupportedException</code>. Why anyone would
* use this method is a secret to me, since this class is immutable.
*
* @return the clone
*/
public Object clone()
{
// This class is final, so no need to use native super.clone().
return new Locale(language, country, variant);
}
/**
* Return the hash code for this locale. The hashcode is the logical
* xor of the hash codes of the language, the country and the variant.
* The hash code is precomputed, since <code>Locale</code>s are often
* used in hash tables.
*
* @return the hashcode
*/
public int hashCode()
{
return hashcode;
}
/**
* Compares two locales. To be equal, obj must be a Locale with the same
* language, country, and variant code.
*
* @param obj the other locale
* @return true if obj is equal to this
*/
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (! (obj instanceof Locale))
return false;
Locale l = (Locale) obj;
return (language == l.language
&& country == l.country
&& variant == l.variant);
}
/**
* Write the locale to an object stream.
*
* @param output the stream to write to
* @throws IOException if the write fails
* @serialData The first three fields are Strings representing language,
* country, and variant. The fourth field is a placeholder for
* the cached hashcode, but this is always written as -1, and
* recomputed when reading it back.
*/
private void writeObject(ObjectOutputStream s)
throws IOException
{
ObjectOutputStream.PutField fields = s.putFields();
fields.put("hashcode", -1);
s.defaultWriteObject();
}
/**
* Reads a locale from the input stream.
*
* @param input the stream to read from
* @throws IOException if reading fails
* @throws ClassNotFoundException if reading fails
* @serialData the hashCode is always invalid and must be recomputed
*/
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
s.defaultReadObject();
language = language.intern();
country = country.intern();
variant = variant.intern();
hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
}
} // class Locale

View file

@ -0,0 +1,23 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_ServiceConfigurationError__
#define __java_util_ServiceConfigurationError__
#pragma interface
#include <java/lang/Error.h>
class java::util::ServiceConfigurationError : public ::java::lang::Error
{
public:
ServiceConfigurationError(::java::lang::String *);
ServiceConfigurationError(::java::lang::String *, ::java::lang::Throwable *);
private:
static const jlong serialVersionUID = 74132770414881LL;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_ServiceConfigurationError__

View file

@ -0,0 +1,28 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_ServiceLoader$1__
#define __java_util_ServiceLoader$1__
#pragma interface
#include <java/lang/Object.h>
class java::util::ServiceLoader$1 : public ::java::lang::Object
{
public: // actually package-private
ServiceLoader$1(::java::util::ServiceLoader *);
public:
jboolean hasNext();
::java::lang::Object * next();
void remove();
private:
::java::util::Iterator * __attribute__((aligned(__alignof__( ::java::lang::Object)))) cacheIt;
public: // actually package-private
::java::util::ServiceLoader * this$0;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_ServiceLoader$1__

View file

@ -0,0 +1,37 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_ServiceLoader__
#define __java_util_ServiceLoader__
#pragma interface
#include <java/lang/Object.h>
class java::util::ServiceLoader : public ::java::lang::Object
{
ServiceLoader(::java::lang::Class *, ::java::lang::ClassLoader *);
public:
::java::util::Iterator * iterator();
static ::java::util::ServiceLoader * load(::java::lang::Class *);
static ::java::util::ServiceLoader * load(::java::lang::Class *, ::java::lang::ClassLoader *);
static ::java::util::ServiceLoader * loadInstalled(::java::lang::Class *);
void reload();
::java::lang::String * toString();
public: // actually package-private
static ::java::util::List * access$0(::java::util::ServiceLoader *);
static ::java::util::Iterator * access$1(::java::util::ServiceLoader *);
static ::java::lang::Class * access$2(::java::util::ServiceLoader *);
static ::java::lang::ClassLoader * access$3(::java::util::ServiceLoader *);
static void access$4(::java::util::ServiceLoader *, ::java::util::Iterator *);
private:
::java::lang::Class * __attribute__((aligned(__alignof__( ::java::lang::Object)))) spi;
::java::lang::ClassLoader * loader;
::java::util::List * cache;
::java::util::Iterator * serviceIt;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_ServiceLoader__

View file

@ -6,21 +6,18 @@
#pragma interface
#include <java/util/AbstractSet.h>
#include <java/lang/Object.h>
class java::util::TreeMap$1 : public ::java::util::AbstractSet
class java::util::TreeMap$1 : public ::java::lang::Object
{
public: // actually package-private
TreeMap$1(::java::util::TreeMap$SubMap *);
TreeMap$1(::java::util::TreeMap$SubMap$NavigableEntrySet *);
public:
jint size();
::java::util::Iterator * iterator();
void clear();
jboolean contains(::java::lang::Object *);
jboolean remove(::java::lang::Object *);
jint TreeMap$1$compare(::java::util::Map$Entry *, ::java::util::Map$Entry *);
jint compare(::java::lang::Object *, ::java::lang::Object *);
public: // actually package-private
::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$1;
::java::util::TreeMap$SubMap$NavigableEntrySet * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$2;
public:
static ::java::lang::Class class$;
};

View file

@ -6,9 +6,9 @@
#pragma interface
#include <java/util/AbstractSet.h>
#include <java/util/AbstractCollection.h>
class java::util::TreeMap$2 : public ::java::util::AbstractSet
class java::util::TreeMap$2 : public ::java::util::AbstractCollection
{
public: // actually package-private
@ -17,10 +17,8 @@ public:
jint size();
::java::util::Iterator * iterator();
void clear();
jboolean contains(::java::lang::Object *);
jboolean remove(::java::lang::Object *);
public: // actually package-private
::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$1;
::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$1;
public:
static ::java::lang::Class class$;
};

View file

@ -12,13 +12,14 @@ class java::util::TreeMap$3 : public ::java::util::AbstractCollection
{
public: // actually package-private
TreeMap$3(::java::util::TreeMap$SubMap *);
TreeMap$3(::java::util::TreeMap$DescendingMap *);
public:
jint size();
::java::util::Iterator * iterator();
void clear();
public: // actually package-private
::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$1;
static ::java::util::TreeMap$DescendingMap * access$0(::java::util::TreeMap$3 *);
::java::util::TreeMap$DescendingMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$1;
public:
static ::java::lang::Class class$;
};

View file

@ -6,21 +6,22 @@
#pragma interface
#include <java/util/AbstractSet.h>
#include <java/lang/Object.h>
class java::util::TreeMap$4 : public ::java::util::AbstractSet
class java::util::TreeMap$4 : public ::java::lang::Object
{
public: // actually package-private
TreeMap$4(::java::util::TreeMap *);
TreeMap$4(::java::util::TreeMap$3 *);
public:
jint size();
::java::util::Iterator * iterator();
void clear();
jboolean contains(::java::lang::Object *);
jboolean remove(::java::lang::Object *);
jboolean hasNext();
::java::lang::Object * next();
void remove();
private:
::java::util::Map$Entry * __attribute__((aligned(__alignof__( ::java::lang::Object)))) last;
::java::util::Map$Entry * next__;
public: // actually package-private
::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$0;
::java::util::TreeMap$3 * this$2;
public:
static ::java::lang::Class class$;
};

View file

@ -6,21 +6,22 @@
#pragma interface
#include <java/util/AbstractSet.h>
#include <java/lang/Object.h>
class java::util::TreeMap$5 : public ::java::util::AbstractSet
class java::util::TreeMap$5 : public ::java::lang::Object
{
public: // actually package-private
TreeMap$5(::java::util::TreeMap *);
TreeMap$5(::java::util::TreeMap$DescendingSet *);
public:
jint size();
::java::util::Iterator * iterator();
void clear();
jboolean contains(::java::lang::Object *);
jboolean remove(::java::lang::Object *);
jboolean hasNext();
::java::lang::Object * next();
void remove();
private:
::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) last;
::java::lang::Object * next__;
public: // actually package-private
::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$0;
::java::util::TreeMap$DescendingSet * this$1;
public:
static ::java::lang::Class class$;
};

View file

@ -6,19 +6,18 @@
#pragma interface
#include <java/util/AbstractCollection.h>
#include <java/lang/Object.h>
class java::util::TreeMap$6 : public ::java::util::AbstractCollection
class java::util::TreeMap$6 : public ::java::lang::Object
{
public: // actually package-private
TreeMap$6(::java::util::TreeMap *);
TreeMap$6(::java::util::TreeMap$NavigableEntrySet *);
public:
jint size();
::java::util::Iterator * iterator();
void clear();
jint TreeMap$6$compare(::java::util::Map$Entry *, ::java::util::Map$Entry *);
jint compare(::java::lang::Object *, ::java::lang::Object *);
public: // actually package-private
::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$0;
::java::util::TreeMap$NavigableEntrySet * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$1;
public:
static ::java::lang::Class class$;
};

View file

@ -0,0 +1,26 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$7__
#define __java_util_TreeMap$7__
#pragma interface
#include <java/util/AbstractCollection.h>
class java::util::TreeMap$7 : public ::java::util::AbstractCollection
{
public: // actually package-private
TreeMap$7(::java::util::TreeMap *);
public:
jint size();
::java::util::Iterator * iterator();
void clear();
public: // actually package-private
::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$0;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$7__

View file

@ -0,0 +1,65 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$DescendingMap__
#define __java_util_TreeMap$DescendingMap__
#pragma interface
#include <java/lang/Object.h>
class java::util::TreeMap$DescendingMap : public ::java::lang::Object
{
public:
TreeMap$DescendingMap(::java::util::NavigableMap *);
::java::util::Map$Entry * ceilingEntry(::java::lang::Object *);
::java::lang::Object * ceilingKey(::java::lang::Object *);
void clear();
::java::util::Comparator * comparator();
jboolean containsKey(::java::lang::Object *);
jboolean containsValue(::java::lang::Object *);
::java::util::NavigableSet * descendingKeySet();
::java::util::NavigableMap * descendingMap();
::java::util::Set * entrySet();
jboolean equals(::java::lang::Object *);
::java::util::Map$Entry * firstEntry();
::java::lang::Object * firstKey();
::java::util::Map$Entry * floorEntry(::java::lang::Object *);
::java::lang::Object * floorKey(::java::lang::Object *);
::java::lang::Object * get(::java::lang::Object *);
jint hashCode();
::java::util::SortedMap * headMap(::java::lang::Object *);
::java::util::NavigableMap * headMap(::java::lang::Object *, jboolean);
::java::util::Map$Entry * higherEntry(::java::lang::Object *);
::java::lang::Object * higherKey(::java::lang::Object *);
::java::util::Set * keySet();
jboolean isEmpty();
::java::util::Map$Entry * lastEntry();
::java::lang::Object * lastKey();
::java::util::Map$Entry * lowerEntry(::java::lang::Object *);
::java::lang::Object * lowerKey(::java::lang::Object *);
::java::util::NavigableSet * navigableKeySet();
::java::util::Map$Entry * pollFirstEntry();
::java::util::Map$Entry * pollLastEntry();
::java::lang::Object * put(::java::lang::Object *, ::java::lang::Object *);
void putAll(::java::util::Map *);
::java::lang::Object * remove(::java::lang::Object *);
jint size();
::java::util::SortedMap * subMap(::java::lang::Object *, ::java::lang::Object *);
::java::util::NavigableMap * subMap(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean);
::java::util::SortedMap * tailMap(::java::lang::Object *);
::java::util::NavigableMap * tailMap(::java::lang::Object *, jboolean);
::java::lang::String * toString();
::java::util::Collection * values();
private:
::java::util::Set * __attribute__((aligned(__alignof__( ::java::lang::Object)))) entries;
::java::util::Set * keys;
::java::util::NavigableSet * nKeys;
::java::util::Collection * values__;
::java::util::NavigableMap * map;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$DescendingMap__

View file

@ -0,0 +1,57 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$DescendingSet__
#define __java_util_TreeMap$DescendingSet__
#pragma interface
#include <java/lang/Object.h>
#include <gcj/array.h>
class java::util::TreeMap$DescendingSet : public ::java::lang::Object
{
public:
TreeMap$DescendingSet(::java::util::NavigableSet *);
jboolean add(::java::lang::Object *);
jboolean addAll(::java::util::Collection *);
::java::lang::Object * ceiling(::java::lang::Object *);
void clear();
::java::util::Comparator * comparator();
jboolean contains(::java::lang::Object *);
jboolean containsAll(::java::util::Collection *);
::java::util::Iterator * descendingIterator();
::java::util::NavigableSet * descendingSet();
jboolean equals(::java::lang::Object *);
::java::lang::Object * first();
::java::lang::Object * floor(::java::lang::Object *);
jint hashCode();
::java::util::SortedSet * headSet(::java::lang::Object *);
::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean);
::java::lang::Object * higher(::java::lang::Object *);
jboolean isEmpty();
::java::util::Iterator * iterator();
::java::lang::Object * last();
::java::lang::Object * lower(::java::lang::Object *);
::java::lang::Object * pollFirst();
::java::lang::Object * pollLast();
jboolean remove(::java::lang::Object *);
jboolean removeAll(::java::util::Collection *);
jboolean retainAll(::java::util::Collection *);
jint size();
::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *);
::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean);
::java::util::SortedSet * tailSet(::java::lang::Object *);
::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean);
JArray< ::java::lang::Object * > * toArray();
JArray< ::java::lang::Object * > * toArray(JArray< ::java::lang::Object * > *);
::java::lang::String * toString();
private:
::java::util::NavigableSet * __attribute__((aligned(__alignof__( ::java::lang::Object)))) set;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$DescendingSet__

View file

@ -0,0 +1,28 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$EntrySet__
#define __java_util_TreeMap$EntrySet__
#pragma interface
#include <java/util/AbstractSet.h>
class java::util::TreeMap$EntrySet : public ::java::util::AbstractSet
{
TreeMap$EntrySet(::java::util::TreeMap *);
public:
virtual jint size();
virtual ::java::util::Iterator * iterator();
virtual void clear();
virtual jboolean contains(::java::lang::Object *);
virtual jboolean remove(::java::lang::Object *);
public: // actually package-private
TreeMap$EntrySet(::java::util::TreeMap *, ::java::util::TreeMap$EntrySet *);
::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$0;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$EntrySet__

View file

@ -0,0 +1,29 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$KeySet__
#define __java_util_TreeMap$KeySet__
#pragma interface
#include <java/util/AbstractSet.h>
class java::util::TreeMap$KeySet : public ::java::util::AbstractSet
{
TreeMap$KeySet(::java::util::TreeMap *);
public:
virtual jint size();
virtual ::java::util::Iterator * iterator();
virtual void clear();
virtual jboolean contains(::java::lang::Object *);
virtual jboolean remove(::java::lang::Object *);
public: // actually package-private
TreeMap$KeySet(::java::util::TreeMap *, ::java::util::TreeMap$KeySet *);
TreeMap$KeySet(::java::util::TreeMap *, ::java::util::TreeMap$KeySet *, ::java::util::TreeMap$KeySet *);
::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$0;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$KeySet__

View file

@ -0,0 +1,55 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$NavigableEntrySet__
#define __java_util_TreeMap$NavigableEntrySet__
#pragma interface
#include <java/util/TreeMap$EntrySet.h>
class java::util::TreeMap$NavigableEntrySet : public ::java::util::TreeMap$EntrySet
{
TreeMap$NavigableEntrySet(::java::util::TreeMap *);
public:
::java::util::Map$Entry * TreeMap$NavigableEntrySet$ceiling(::java::util::Map$Entry *);
::java::util::Comparator * comparator();
::java::util::Iterator * descendingIterator();
::java::util::NavigableSet * descendingSet();
::java::util::Map$Entry * TreeMap$NavigableEntrySet$first();
::java::util::Map$Entry * TreeMap$NavigableEntrySet$floor(::java::util::Map$Entry *);
::java::util::SortedSet * TreeMap$NavigableEntrySet$headSet(::java::util::Map$Entry *);
::java::util::NavigableSet * TreeMap$NavigableEntrySet$headSet(::java::util::Map$Entry *, jboolean);
::java::util::Map$Entry * TreeMap$NavigableEntrySet$higher(::java::util::Map$Entry *);
::java::util::Map$Entry * TreeMap$NavigableEntrySet$last();
::java::util::Map$Entry * TreeMap$NavigableEntrySet$lower(::java::util::Map$Entry *);
::java::util::Map$Entry * TreeMap$NavigableEntrySet$pollFirst();
::java::util::Map$Entry * TreeMap$NavigableEntrySet$pollLast();
::java::util::SortedSet * TreeMap$NavigableEntrySet$subSet(::java::util::Map$Entry *, ::java::util::Map$Entry *);
::java::util::NavigableSet * TreeMap$NavigableEntrySet$subSet(::java::util::Map$Entry *, jboolean, ::java::util::Map$Entry *, jboolean);
::java::util::SortedSet * TreeMap$NavigableEntrySet$tailSet(::java::util::Map$Entry *);
::java::util::NavigableSet * TreeMap$NavigableEntrySet$tailSet(::java::util::Map$Entry *, jboolean);
::java::lang::Object * pollFirst();
::java::lang::Object * higher(::java::lang::Object *);
::java::lang::Object * lower(::java::lang::Object *);
::java::lang::Object * pollLast();
::java::lang::Object * first();
::java::lang::Object * last();
::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean);
::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *);
::java::lang::Object * ceiling(::java::lang::Object *);
::java::lang::Object * floor(::java::lang::Object *);
::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean);
::java::util::SortedSet * tailSet(::java::lang::Object *);
::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean);
::java::util::SortedSet * headSet(::java::lang::Object *);
public: // actually package-private
TreeMap$NavigableEntrySet(::java::util::TreeMap *, ::java::util::TreeMap$NavigableEntrySet *);
static ::java::util::TreeMap * access$15(::java::util::TreeMap$NavigableEntrySet *);
::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::TreeMap$EntrySet)))) this$0;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$NavigableEntrySet__

View file

@ -0,0 +1,40 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$NavigableKeySet__
#define __java_util_TreeMap$NavigableKeySet__
#pragma interface
#include <java/util/TreeMap$KeySet.h>
class java::util::TreeMap$NavigableKeySet : public ::java::util::TreeMap$KeySet
{
TreeMap$NavigableKeySet(::java::util::TreeMap *);
public:
::java::lang::Object * ceiling(::java::lang::Object *);
::java::util::Comparator * comparator();
::java::util::Iterator * descendingIterator();
::java::util::NavigableSet * descendingSet();
::java::lang::Object * first();
::java::lang::Object * floor(::java::lang::Object *);
::java::util::SortedSet * headSet(::java::lang::Object *);
::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean);
::java::lang::Object * higher(::java::lang::Object *);
::java::lang::Object * last();
::java::lang::Object * lower(::java::lang::Object *);
::java::lang::Object * pollFirst();
::java::lang::Object * pollLast();
::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *);
::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean);
::java::util::SortedSet * tailSet(::java::lang::Object *);
::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean);
public: // actually package-private
TreeMap$NavigableKeySet(::java::util::TreeMap *, ::java::util::TreeMap$NavigableKeySet *);
::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::TreeMap$KeySet)))) this$0;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$NavigableKeySet__

View file

@ -0,0 +1,28 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$SubMap$EntrySet__
#define __java_util_TreeMap$SubMap$EntrySet__
#pragma interface
#include <java/util/AbstractSet.h>
class java::util::TreeMap$SubMap$EntrySet : public ::java::util::AbstractSet
{
TreeMap$SubMap$EntrySet(::java::util::TreeMap$SubMap *);
public:
virtual jint size();
virtual ::java::util::Iterator * iterator();
virtual void clear();
virtual jboolean contains(::java::lang::Object *);
virtual jboolean remove(::java::lang::Object *);
public: // actually package-private
TreeMap$SubMap$EntrySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$EntrySet *);
::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$1;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$SubMap$EntrySet__

View file

@ -0,0 +1,29 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$SubMap$KeySet__
#define __java_util_TreeMap$SubMap$KeySet__
#pragma interface
#include <java/util/AbstractSet.h>
class java::util::TreeMap$SubMap$KeySet : public ::java::util::AbstractSet
{
TreeMap$SubMap$KeySet(::java::util::TreeMap$SubMap *);
public:
virtual jint size();
virtual ::java::util::Iterator * iterator();
virtual void clear();
virtual jboolean contains(::java::lang::Object *);
virtual jboolean remove(::java::lang::Object *);
public: // actually package-private
TreeMap$SubMap$KeySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$KeySet *);
TreeMap$SubMap$KeySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$KeySet *, ::java::util::TreeMap$SubMap$KeySet *);
::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$1;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$SubMap$KeySet__

View file

@ -0,0 +1,55 @@
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_util_TreeMap$SubMap$NavigableEntrySet__
#define __java_util_TreeMap$SubMap$NavigableEntrySet__
#pragma interface
#include <java/util/TreeMap$SubMap$EntrySet.h>
class java::util::TreeMap$SubMap$NavigableEntrySet : public ::java::util::TreeMap$SubMap$EntrySet
{
TreeMap$SubMap$NavigableEntrySet(::java::util::TreeMap$SubMap *);
public:
::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$ceiling(::java::util::Map$Entry *);
::java::util::Comparator * comparator();
::java::util::Iterator * descendingIterator();
::java::util::NavigableSet * descendingSet();
::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$first();
::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$floor(::java::util::Map$Entry *);
::java::util::SortedSet * TreeMap$SubMap$NavigableEntrySet$headSet(::java::util::Map$Entry *);
::java::util::NavigableSet * TreeMap$SubMap$NavigableEntrySet$headSet(::java::util::Map$Entry *, jboolean);
::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$higher(::java::util::Map$Entry *);
::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$last();
::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$lower(::java::util::Map$Entry *);
::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$pollFirst();
::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$pollLast();
::java::util::SortedSet * TreeMap$SubMap$NavigableEntrySet$subSet(::java::util::Map$Entry *, ::java::util::Map$Entry *);
::java::util::NavigableSet * TreeMap$SubMap$NavigableEntrySet$subSet(::java::util::Map$Entry *, jboolean, ::java::util::Map$Entry *, jboolean);
::java::util::SortedSet * TreeMap$SubMap$NavigableEntrySet$tailSet(::java::util::Map$Entry *);
::java::util::NavigableSet * TreeMap$SubMap$NavigableEntrySet$tailSet(::java::util::Map$Entry *, jboolean);
::java::lang::Object * pollFirst();
::java::lang::Object * higher(::java::lang::Object *);
::java::lang::Object * lower(::java::lang::Object *);
::java::lang::Object * pollLast();
::java::lang::Object * first();
::java::lang::Object * last();
::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean);
::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *);
::java::lang::Object * ceiling(::java::lang::Object *);
::java::lang::Object * floor(::java::lang::Object *);
::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean);
::java::util::SortedSet * tailSet(::java::lang::Object *);
::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean);
::java::util::SortedSet * headSet(::java::lang::Object *);
public: // actually package-private
TreeMap$SubMap$NavigableEntrySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$NavigableEntrySet *);
static ::java::util::TreeMap$SubMap * access$15(::java::util::TreeMap$SubMap$NavigableEntrySet *);
::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::TreeMap$SubMap$EntrySet)))) this$1;
public:
static ::java::lang::Class class$;
};
#endif // __java_util_TreeMap$SubMap$NavigableEntrySet__

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