Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_AbstractMethodError__
|
||||
#define __java_lang_AbstractMethodError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IncompatibleClassChangeError.h>
|
||||
|
||||
class java::lang::AbstractMethodError : public ::java::lang::IncompatibleClassChangeError
|
||||
{
|
||||
|
||||
public:
|
||||
AbstractMethodError();
|
||||
AbstractMethodError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -1654391082989018462LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_AbstractMethodError__
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Appendable__
|
||||
#define __java_lang_Appendable__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Appendable : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ::java::lang::Appendable * append(jchar) = 0;
|
||||
virtual ::java::lang::Appendable * append(::java::lang::CharSequence *) = 0;
|
||||
virtual ::java::lang::Appendable * append(::java::lang::CharSequence *, jint, jint) = 0;
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_Appendable__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ArithmeticException__
|
||||
#define __java_lang_ArithmeticException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::ArithmeticException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
ArithmeticException();
|
||||
ArithmeticException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 2256477558314496007LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ArithmeticException__
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ArrayIndexOutOfBoundsException__
|
||||
#define __java_lang_ArrayIndexOutOfBoundsException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IndexOutOfBoundsException.h>
|
||||
|
||||
class java::lang::ArrayIndexOutOfBoundsException : public ::java::lang::IndexOutOfBoundsException
|
||||
{
|
||||
|
||||
public:
|
||||
ArrayIndexOutOfBoundsException();
|
||||
ArrayIndexOutOfBoundsException(::java::lang::String *);
|
||||
ArrayIndexOutOfBoundsException(jint);
|
||||
private:
|
||||
static const jlong serialVersionUID = -5116101128118950844LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ArrayIndexOutOfBoundsException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ArrayStoreException__
|
||||
#define __java_lang_ArrayStoreException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::ArrayStoreException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
ArrayStoreException();
|
||||
ArrayStoreException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -4522193890499838241LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ArrayStoreException__
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_AssertionError__
|
||||
#define __java_lang_AssertionError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Error.h>
|
||||
|
||||
class java::lang::AssertionError : public ::java::lang::Error
|
||||
{
|
||||
|
||||
public:
|
||||
AssertionError();
|
||||
AssertionError(::java::lang::Object *);
|
||||
AssertionError(jboolean);
|
||||
AssertionError(jchar);
|
||||
AssertionError(jint);
|
||||
AssertionError(jlong);
|
||||
AssertionError(jfloat);
|
||||
AssertionError(jdouble);
|
||||
private:
|
||||
static const jlong serialVersionUID = -5013299493970297370LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_AssertionError__
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Boolean__
|
||||
#define __java_lang_Boolean__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Boolean : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
Boolean(jboolean);
|
||||
Boolean(::java::lang::String *);
|
||||
jboolean booleanValue();
|
||||
static ::java::lang::Boolean * valueOf(jboolean);
|
||||
static ::java::lang::Boolean * valueOf(::java::lang::String *);
|
||||
static ::java::lang::String * toString(jboolean);
|
||||
::java::lang::String * toString();
|
||||
jint hashCode();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
static jboolean getBoolean(::java::lang::String *);
|
||||
jint target$compareTo(::java::lang::Boolean *);
|
||||
static jboolean parseBoolean(::java::lang::String *);
|
||||
jint compareTo(::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -3665804199014368530LL;
|
||||
public:
|
||||
static ::java::lang::Boolean * TRUE;
|
||||
static ::java::lang::Boolean * FALSE;
|
||||
static ::java::lang::Class * TYPE;
|
||||
private:
|
||||
jboolean __attribute__((aligned(__alignof__( ::java::lang::Object)))) value;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Boolean__
|
||||
@@ -0,0 +1,51 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Byte__
|
||||
#define __java_lang_Byte__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Number.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::Byte : public ::java::lang::Number
|
||||
{
|
||||
|
||||
public:
|
||||
Byte(jbyte);
|
||||
Byte(::java::lang::String *);
|
||||
static ::java::lang::String * toString(jbyte);
|
||||
static jbyte parseByte(::java::lang::String *);
|
||||
static jbyte parseByte(::java::lang::String *, jint);
|
||||
static ::java::lang::Byte * valueOf(::java::lang::String *, jint);
|
||||
static ::java::lang::Byte * valueOf(::java::lang::String *);
|
||||
static ::java::lang::Byte * valueOf(jbyte);
|
||||
static ::java::lang::Byte * decode(::java::lang::String *);
|
||||
jbyte byteValue();
|
||||
jshort shortValue();
|
||||
jint intValue();
|
||||
jlong longValue();
|
||||
jfloat floatValue();
|
||||
jdouble doubleValue();
|
||||
::java::lang::String * toString();
|
||||
jint hashCode();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
jint target$compareTo(::java::lang::Byte *);
|
||||
jint compareTo(::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -7183698231559129828LL;
|
||||
public:
|
||||
static const jbyte MIN_VALUE = -128;
|
||||
static const jbyte MAX_VALUE = 127;
|
||||
static ::java::lang::Class * TYPE;
|
||||
static const jint SIZE = 8;
|
||||
private:
|
||||
static JArray< ::java::lang::Byte * > * byteCache;
|
||||
jbyte __attribute__((aligned(__alignof__( ::java::lang::Number)))) value;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Byte__
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_CharSequence__
|
||||
#define __java_lang_CharSequence__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::CharSequence : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
virtual jchar charAt(jint) = 0;
|
||||
virtual jint length() = 0;
|
||||
virtual ::java::lang::CharSequence * subSequence(jint, jint) = 0;
|
||||
virtual ::java::lang::String * toString() = 0;
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_CharSequence__
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Character$Subset__
|
||||
#define __java_lang_Character$Subset__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Character$Subset : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public: // actually protected
|
||||
Character$Subset(::java::lang::String *);
|
||||
public:
|
||||
virtual jboolean equals(::java::lang::Object *);
|
||||
virtual jint hashCode();
|
||||
virtual ::java::lang::String * toString();
|
||||
private:
|
||||
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) name;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Character$Subset__
|
||||
@@ -0,0 +1,161 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Character$UnicodeBlock__
|
||||
#define __java_lang_Character$UnicodeBlock__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Character$Subset.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::Character$UnicodeBlock : public ::java::lang::Character$Subset
|
||||
{
|
||||
|
||||
Character$UnicodeBlock(jint, jint, ::java::lang::String *, ::java::lang::String *);
|
||||
public:
|
||||
static ::java::lang::Character$UnicodeBlock * of(jchar);
|
||||
static ::java::lang::Character$UnicodeBlock * of(jint);
|
||||
static ::java::lang::Character$UnicodeBlock * forName(::java::lang::String *);
|
||||
private:
|
||||
jint __attribute__((aligned(__alignof__( ::java::lang::Character$Subset)))) start;
|
||||
jint end;
|
||||
::java::lang::String * canonicalName;
|
||||
static const jint CANONICAL_NAME = 0;
|
||||
static const jint NO_SPACES_NAME = 1;
|
||||
static const jint CONSTANT_NAME = 2;
|
||||
public:
|
||||
static ::java::lang::Character$UnicodeBlock * BASIC_LATIN;
|
||||
static ::java::lang::Character$UnicodeBlock * LATIN_1_SUPPLEMENT;
|
||||
static ::java::lang::Character$UnicodeBlock * LATIN_EXTENDED_A;
|
||||
static ::java::lang::Character$UnicodeBlock * LATIN_EXTENDED_B;
|
||||
static ::java::lang::Character$UnicodeBlock * IPA_EXTENSIONS;
|
||||
static ::java::lang::Character$UnicodeBlock * SPACING_MODIFIER_LETTERS;
|
||||
static ::java::lang::Character$UnicodeBlock * COMBINING_DIACRITICAL_MARKS;
|
||||
static ::java::lang::Character$UnicodeBlock * GREEK;
|
||||
static ::java::lang::Character$UnicodeBlock * CYRILLIC;
|
||||
static ::java::lang::Character$UnicodeBlock * CYRILLIC_SUPPLEMENTARY;
|
||||
static ::java::lang::Character$UnicodeBlock * ARMENIAN;
|
||||
static ::java::lang::Character$UnicodeBlock * HEBREW;
|
||||
static ::java::lang::Character$UnicodeBlock * ARABIC;
|
||||
static ::java::lang::Character$UnicodeBlock * SYRIAC;
|
||||
static ::java::lang::Character$UnicodeBlock * THAANA;
|
||||
static ::java::lang::Character$UnicodeBlock * DEVANAGARI;
|
||||
static ::java::lang::Character$UnicodeBlock * BENGALI;
|
||||
static ::java::lang::Character$UnicodeBlock * GURMUKHI;
|
||||
static ::java::lang::Character$UnicodeBlock * GUJARATI;
|
||||
static ::java::lang::Character$UnicodeBlock * ORIYA;
|
||||
static ::java::lang::Character$UnicodeBlock * TAMIL;
|
||||
static ::java::lang::Character$UnicodeBlock * TELUGU;
|
||||
static ::java::lang::Character$UnicodeBlock * KANNADA;
|
||||
static ::java::lang::Character$UnicodeBlock * MALAYALAM;
|
||||
static ::java::lang::Character$UnicodeBlock * SINHALA;
|
||||
static ::java::lang::Character$UnicodeBlock * THAI;
|
||||
static ::java::lang::Character$UnicodeBlock * LAO;
|
||||
static ::java::lang::Character$UnicodeBlock * TIBETAN;
|
||||
static ::java::lang::Character$UnicodeBlock * MYANMAR;
|
||||
static ::java::lang::Character$UnicodeBlock * GEORGIAN;
|
||||
static ::java::lang::Character$UnicodeBlock * HANGUL_JAMO;
|
||||
static ::java::lang::Character$UnicodeBlock * ETHIOPIC;
|
||||
static ::java::lang::Character$UnicodeBlock * CHEROKEE;
|
||||
static ::java::lang::Character$UnicodeBlock * UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS;
|
||||
static ::java::lang::Character$UnicodeBlock * OGHAM;
|
||||
static ::java::lang::Character$UnicodeBlock * RUNIC;
|
||||
static ::java::lang::Character$UnicodeBlock * TAGALOG;
|
||||
static ::java::lang::Character$UnicodeBlock * HANUNOO;
|
||||
static ::java::lang::Character$UnicodeBlock * BUHID;
|
||||
static ::java::lang::Character$UnicodeBlock * TAGBANWA;
|
||||
static ::java::lang::Character$UnicodeBlock * KHMER;
|
||||
static ::java::lang::Character$UnicodeBlock * MONGOLIAN;
|
||||
static ::java::lang::Character$UnicodeBlock * LIMBU;
|
||||
static ::java::lang::Character$UnicodeBlock * TAI_LE;
|
||||
static ::java::lang::Character$UnicodeBlock * KHMER_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * PHONETIC_EXTENSIONS;
|
||||
static ::java::lang::Character$UnicodeBlock * LATIN_EXTENDED_ADDITIONAL;
|
||||
static ::java::lang::Character$UnicodeBlock * GREEK_EXTENDED;
|
||||
static ::java::lang::Character$UnicodeBlock * GENERAL_PUNCTUATION;
|
||||
static ::java::lang::Character$UnicodeBlock * SUPERSCRIPTS_AND_SUBSCRIPTS;
|
||||
static ::java::lang::Character$UnicodeBlock * CURRENCY_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * COMBINING_MARKS_FOR_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * LETTERLIKE_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * NUMBER_FORMS;
|
||||
static ::java::lang::Character$UnicodeBlock * ARROWS;
|
||||
static ::java::lang::Character$UnicodeBlock * MATHEMATICAL_OPERATORS;
|
||||
static ::java::lang::Character$UnicodeBlock * MISCELLANEOUS_TECHNICAL;
|
||||
static ::java::lang::Character$UnicodeBlock * CONTROL_PICTURES;
|
||||
static ::java::lang::Character$UnicodeBlock * OPTICAL_CHARACTER_RECOGNITION;
|
||||
static ::java::lang::Character$UnicodeBlock * ENCLOSED_ALPHANUMERICS;
|
||||
static ::java::lang::Character$UnicodeBlock * BOX_DRAWING;
|
||||
static ::java::lang::Character$UnicodeBlock * BLOCK_ELEMENTS;
|
||||
static ::java::lang::Character$UnicodeBlock * GEOMETRIC_SHAPES;
|
||||
static ::java::lang::Character$UnicodeBlock * MISCELLANEOUS_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * DINGBATS;
|
||||
static ::java::lang::Character$UnicodeBlock * MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A;
|
||||
static ::java::lang::Character$UnicodeBlock * SUPPLEMENTAL_ARROWS_A;
|
||||
static ::java::lang::Character$UnicodeBlock * BRAILLE_PATTERNS;
|
||||
static ::java::lang::Character$UnicodeBlock * SUPPLEMENTAL_ARROWS_B;
|
||||
static ::java::lang::Character$UnicodeBlock * MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B;
|
||||
static ::java::lang::Character$UnicodeBlock * SUPPLEMENTAL_MATHEMATICAL_OPERATORS;
|
||||
static ::java::lang::Character$UnicodeBlock * MISCELLANEOUS_SYMBOLS_AND_ARROWS;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_RADICALS_SUPPLEMENT;
|
||||
static ::java::lang::Character$UnicodeBlock * KANGXI_RADICALS;
|
||||
static ::java::lang::Character$UnicodeBlock * IDEOGRAPHIC_DESCRIPTION_CHARACTERS;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_SYMBOLS_AND_PUNCTUATION;
|
||||
static ::java::lang::Character$UnicodeBlock * HIRAGANA;
|
||||
static ::java::lang::Character$UnicodeBlock * KATAKANA;
|
||||
static ::java::lang::Character$UnicodeBlock * BOPOMOFO;
|
||||
static ::java::lang::Character$UnicodeBlock * HANGUL_COMPATIBILITY_JAMO;
|
||||
static ::java::lang::Character$UnicodeBlock * KANBUN;
|
||||
static ::java::lang::Character$UnicodeBlock * BOPOMOFO_EXTENDED;
|
||||
static ::java::lang::Character$UnicodeBlock * KATAKANA_PHONETIC_EXTENSIONS;
|
||||
static ::java::lang::Character$UnicodeBlock * ENCLOSED_CJK_LETTERS_AND_MONTHS;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_COMPATIBILITY;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A;
|
||||
static ::java::lang::Character$UnicodeBlock * YIJING_HEXAGRAM_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_UNIFIED_IDEOGRAPHS;
|
||||
static ::java::lang::Character$UnicodeBlock * YI_SYLLABLES;
|
||||
static ::java::lang::Character$UnicodeBlock * YI_RADICALS;
|
||||
static ::java::lang::Character$UnicodeBlock * HANGUL_SYLLABLES;
|
||||
static ::java::lang::Character$UnicodeBlock * HIGH_SURROGATES;
|
||||
static ::java::lang::Character$UnicodeBlock * HIGH_PRIVATE_USE_SURROGATES;
|
||||
static ::java::lang::Character$UnicodeBlock * LOW_SURROGATES;
|
||||
static ::java::lang::Character$UnicodeBlock * PRIVATE_USE_AREA;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_COMPATIBILITY_IDEOGRAPHS;
|
||||
static ::java::lang::Character$UnicodeBlock * ALPHABETIC_PRESENTATION_FORMS;
|
||||
static ::java::lang::Character$UnicodeBlock * ARABIC_PRESENTATION_FORMS_A;
|
||||
static ::java::lang::Character$UnicodeBlock * VARIATION_SELECTORS;
|
||||
static ::java::lang::Character$UnicodeBlock * COMBINING_HALF_MARKS;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_COMPATIBILITY_FORMS;
|
||||
static ::java::lang::Character$UnicodeBlock * SMALL_FORM_VARIANTS;
|
||||
static ::java::lang::Character$UnicodeBlock * ARABIC_PRESENTATION_FORMS_B;
|
||||
static ::java::lang::Character$UnicodeBlock * HALFWIDTH_AND_FULLWIDTH_FORMS;
|
||||
static ::java::lang::Character$UnicodeBlock * SPECIALS;
|
||||
static ::java::lang::Character$UnicodeBlock * LINEAR_B_SYLLABARY;
|
||||
static ::java::lang::Character$UnicodeBlock * LINEAR_B_IDEOGRAMS;
|
||||
static ::java::lang::Character$UnicodeBlock * AEGEAN_NUMBERS;
|
||||
static ::java::lang::Character$UnicodeBlock * OLD_ITALIC;
|
||||
static ::java::lang::Character$UnicodeBlock * GOTHIC;
|
||||
static ::java::lang::Character$UnicodeBlock * UGARITIC;
|
||||
static ::java::lang::Character$UnicodeBlock * DESERET;
|
||||
static ::java::lang::Character$UnicodeBlock * SHAVIAN;
|
||||
static ::java::lang::Character$UnicodeBlock * OSMANYA;
|
||||
static ::java::lang::Character$UnicodeBlock * CYPRIOT_SYLLABARY;
|
||||
static ::java::lang::Character$UnicodeBlock * BYZANTINE_MUSICAL_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * MUSICAL_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * TAI_XUAN_JING_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * MATHEMATICAL_ALPHANUMERIC_SYMBOLS;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B;
|
||||
static ::java::lang::Character$UnicodeBlock * CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT;
|
||||
static ::java::lang::Character$UnicodeBlock * TAGS;
|
||||
static ::java::lang::Character$UnicodeBlock * VARIATION_SELECTORS_SUPPLEMENT;
|
||||
static ::java::lang::Character$UnicodeBlock * SUPPLEMENTARY_PRIVATE_USE_AREA_A;
|
||||
static ::java::lang::Character$UnicodeBlock * SUPPLEMENTARY_PRIVATE_USE_AREA_B;
|
||||
static ::java::lang::Character$UnicodeBlock * SURROGATES_AREA;
|
||||
private:
|
||||
static JArray< ::java::lang::Character$UnicodeBlock * > * sets;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Character$UnicodeBlock__
|
||||
@@ -0,0 +1,175 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Character__
|
||||
#define __java_lang_Character__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::Character : public ::java::lang::Object
|
||||
{
|
||||
|
||||
static jchar readChar(jchar);
|
||||
static jchar readCodePoint(jint);
|
||||
public:
|
||||
Character(jchar);
|
||||
jchar charValue();
|
||||
jint hashCode();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
::java::lang::String * toString();
|
||||
static ::java::lang::String * toString(jchar);
|
||||
static jboolean isLowerCase(jchar);
|
||||
static jboolean isLowerCase(jint);
|
||||
static jboolean isUpperCase(jchar);
|
||||
static jboolean isUpperCase(jint);
|
||||
static jboolean isTitleCase(jchar);
|
||||
static jboolean isTitleCase(jint);
|
||||
static jboolean isDigit(jchar);
|
||||
static jboolean isDigit(jint);
|
||||
static jboolean isDefined(jchar);
|
||||
static jboolean isDefined(jint);
|
||||
static jboolean isLetter(jchar);
|
||||
static jboolean isLetter(jint);
|
||||
static jboolean isLetterOrDigit(jchar);
|
||||
static jboolean isLetterOrDigit(jint);
|
||||
static jboolean isJavaLetter(jchar);
|
||||
static jboolean isJavaIdentifierStart(jint);
|
||||
static jboolean isJavaLetterOrDigit(jchar);
|
||||
static jboolean isJavaIdentifierStart(jchar);
|
||||
static jboolean isJavaIdentifierPart(jchar);
|
||||
static jboolean isJavaIdentifierPart(jint);
|
||||
static jboolean isUnicodeIdentifierStart(jchar);
|
||||
static jboolean isUnicodeIdentifierStart(jint);
|
||||
static jboolean isUnicodeIdentifierPart(jchar);
|
||||
static jboolean isUnicodeIdentifierPart(jint);
|
||||
static jboolean isIdentifierIgnorable(jchar);
|
||||
static jboolean isIdentifierIgnorable(jint);
|
||||
static jchar toLowerCase(jchar);
|
||||
static jint toLowerCase(jint);
|
||||
static jchar toUpperCase(jchar);
|
||||
static jint toUpperCase(jint);
|
||||
static jchar toTitleCase(jchar);
|
||||
static jint toTitleCase(jint);
|
||||
static jint digit(jchar, jint);
|
||||
static jint digit(jint, jint);
|
||||
static jint getNumericValue(jchar);
|
||||
static jint getNumericValue(jint);
|
||||
static jboolean isSpace(jchar);
|
||||
static jboolean isSpaceChar(jchar);
|
||||
static jboolean isSpaceChar(jint);
|
||||
static jboolean isWhitespace(jchar);
|
||||
static jboolean isWhitespace(jint);
|
||||
static jboolean isISOControl(jchar);
|
||||
static jboolean isISOControl(jint);
|
||||
static jint getType(jchar);
|
||||
static jint getType(jint);
|
||||
static jchar forDigit(jint, jint);
|
||||
static jbyte getDirectionality(jchar);
|
||||
static jbyte getDirectionality(jint);
|
||||
static jboolean isMirrored(jchar);
|
||||
static jboolean isMirrored(jint);
|
||||
jint compareTo(::java::lang::Character *);
|
||||
jint compareTo(::java::lang::Object *);
|
||||
static ::java::lang::Character * valueOf(jchar);
|
||||
static jchar reverseBytes(jchar);
|
||||
static JArray< jchar > * toChars(jint);
|
||||
static jint toChars(jint, JArray< jchar > *, jint);
|
||||
static jint charCount(jint);
|
||||
static jboolean isSupplementaryCodePoint(jint);
|
||||
static jboolean isValidCodePoint(jint);
|
||||
static jboolean isHighSurrogate(jchar);
|
||||
static jboolean isLowSurrogate(jchar);
|
||||
static jboolean isSurrogatePair(jchar, jchar);
|
||||
static jint toCodePoint(jchar, jchar);
|
||||
static jint codePointAt(::java::lang::CharSequence *, jint);
|
||||
static jint codePointAt(JArray< jchar > *, jint);
|
||||
static jint codePointAt(JArray< jchar > *, jint, jint);
|
||||
static jint codePointBefore(JArray< jchar > *, jint);
|
||||
static jint codePointBefore(JArray< jchar > *, jint, jint);
|
||||
static jint codePointBefore(::java::lang::CharSequence *, jint);
|
||||
private:
|
||||
jchar __attribute__((aligned(__alignof__( ::java::lang::Object)))) value;
|
||||
static const jlong serialVersionUID = 3786198910865385080LL;
|
||||
public:
|
||||
static const jint MIN_RADIX = 2;
|
||||
static const jint MAX_RADIX = 36;
|
||||
static const jchar MIN_VALUE = 0;
|
||||
static const jchar MAX_VALUE = 65535;
|
||||
static ::java::lang::Class * TYPE;
|
||||
static const jint SIZE = 16;
|
||||
private:
|
||||
static const jint MAX_CACHE = 127;
|
||||
static JArray< ::java::lang::Character * > * charCache;
|
||||
public:
|
||||
static const jbyte UPPERCASE_LETTER = 1;
|
||||
static const jbyte LOWERCASE_LETTER = 2;
|
||||
static const jbyte TITLECASE_LETTER = 3;
|
||||
static const jbyte NON_SPACING_MARK = 6;
|
||||
static const jbyte COMBINING_SPACING_MARK = 8;
|
||||
static const jbyte ENCLOSING_MARK = 7;
|
||||
static const jbyte DECIMAL_DIGIT_NUMBER = 9;
|
||||
static const jbyte LETTER_NUMBER = 10;
|
||||
static const jbyte OTHER_NUMBER = 11;
|
||||
static const jbyte SPACE_SEPARATOR = 12;
|
||||
static const jbyte LINE_SEPARATOR = 13;
|
||||
static const jbyte PARAGRAPH_SEPARATOR = 14;
|
||||
static const jbyte CONTROL = 15;
|
||||
static const jbyte FORMAT = 16;
|
||||
static const jbyte SURROGATE = 19;
|
||||
static const jbyte PRIVATE_USE = 18;
|
||||
static const jbyte UNASSIGNED = 0;
|
||||
static const jbyte MODIFIER_LETTER = 4;
|
||||
static const jbyte OTHER_LETTER = 5;
|
||||
static const jbyte CONNECTOR_PUNCTUATION = 23;
|
||||
static const jbyte DASH_PUNCTUATION = 20;
|
||||
static const jbyte START_PUNCTUATION = 21;
|
||||
static const jbyte END_PUNCTUATION = 22;
|
||||
static const jbyte INITIAL_QUOTE_PUNCTUATION = 29;
|
||||
static const jbyte FINAL_QUOTE_PUNCTUATION = 30;
|
||||
static const jbyte OTHER_PUNCTUATION = 24;
|
||||
static const jbyte MATH_SYMBOL = 25;
|
||||
static const jbyte CURRENCY_SYMBOL = 26;
|
||||
static const jbyte MODIFIER_SYMBOL = 27;
|
||||
static const jbyte OTHER_SYMBOL = 28;
|
||||
static const jbyte DIRECTIONALITY_UNDEFINED = -1;
|
||||
static const jbyte DIRECTIONALITY_LEFT_TO_RIGHT = 0;
|
||||
static const jbyte DIRECTIONALITY_RIGHT_TO_LEFT = 1;
|
||||
static const jbyte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 2;
|
||||
static const jbyte DIRECTIONALITY_EUROPEAN_NUMBER = 3;
|
||||
static const jbyte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 4;
|
||||
static const jbyte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 5;
|
||||
static const jbyte DIRECTIONALITY_ARABIC_NUMBER = 6;
|
||||
static const jbyte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 7;
|
||||
static const jbyte DIRECTIONALITY_NONSPACING_MARK = 8;
|
||||
static const jbyte DIRECTIONALITY_BOUNDARY_NEUTRAL = 9;
|
||||
static const jbyte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 10;
|
||||
static const jbyte DIRECTIONALITY_SEGMENT_SEPARATOR = 11;
|
||||
static const jbyte DIRECTIONALITY_WHITESPACE = 12;
|
||||
static const jbyte DIRECTIONALITY_OTHER_NEUTRALS = 13;
|
||||
static const jbyte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 14;
|
||||
static const jbyte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 15;
|
||||
static const jbyte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 16;
|
||||
static const jbyte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 17;
|
||||
static const jbyte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18;
|
||||
private:
|
||||
static const jint TYPE_MASK = 31;
|
||||
static const jint NO_BREAK_MASK = 32;
|
||||
static const jint MIRROR_MASK = 64;
|
||||
public:
|
||||
static const jint MIN_SUPPLEMENTARY_CODE_POINT = 65536;
|
||||
static const jint MIN_CODE_POINT = 0;
|
||||
static const jint MAX_CODE_POINT = 1114111;
|
||||
static const jchar MIN_HIGH_SURROGATE = 55296;
|
||||
static const jchar MAX_HIGH_SURROGATE = 56319;
|
||||
static const jchar MIN_LOW_SURROGATE = 56320;
|
||||
static const jchar MAX_LOW_SURROGATE = 57343;
|
||||
static const jchar MIN_SURROGATE = 55296;
|
||||
static const jchar MAX_SURROGATE = 57343;
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Character__
|
||||
@@ -192,6 +192,24 @@ struct _Jv_TypeAssertion
|
||||
_Jv_Utf8Const *op2;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
JV_CLASS_ATTR,
|
||||
JV_METHOD_ATTR,
|
||||
JV_FIELD_ATTR,
|
||||
JV_DONE_ATTR
|
||||
} jv_attr_type;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
JV_INNER_CLASSES_KIND,
|
||||
JV_ENCLOSING_METHOD_KIND,
|
||||
JV_SIGNATURE_KIND,
|
||||
JV_ANNOTATIONS_KIND,
|
||||
JV_PARAMETER_ANNOTATIONS_KIND,
|
||||
JV_ANNOTATION_DEFAULT_KIND
|
||||
} jv_attr_kind;
|
||||
|
||||
#define JV_PRIMITIVE_VTABLE ((_Jv_VTable *) -1)
|
||||
|
||||
#define JV_CLASS(Obj) ((jclass) (*(_Jv_VTable **) Obj)->clas)
|
||||
@@ -341,6 +359,15 @@ private:
|
||||
java::lang::reflect::Method *_getMethod (jstring, JArray<jclass> *);
|
||||
java::lang::reflect::Method *_getDeclaredMethod (jstring, JArray<jclass> *);
|
||||
|
||||
jstring getReflectionSignature (jint /*jv_attr_type*/ type,
|
||||
jint obj_index);
|
||||
jstring getReflectionSignature (::java::lang::reflect::Method *);
|
||||
jstring getReflectionSignature (::java::lang::reflect::Constructor *);
|
||||
jstring getReflectionSignature (::java::lang::reflect::Field *);
|
||||
|
||||
jstring getClassSignature();
|
||||
jobject getMethodDefaultValue (::java::lang::reflect::Method *);
|
||||
|
||||
public:
|
||||
JArray<java::lang::reflect::Field *> *getFields (void);
|
||||
|
||||
@@ -403,10 +430,34 @@ public:
|
||||
|
||||
JArray<java::lang::reflect::TypeVariable *> *getTypeParameters (void);
|
||||
|
||||
jint getEnclosingMethodData(void);
|
||||
java::lang::Class *getEnclosingClass (void);
|
||||
java::lang::reflect::Constructor *getEnclosingConstructor (void);
|
||||
java::lang::reflect::Method *getEnclosingMethod (void);
|
||||
jboolean isEnum (void);
|
||||
jobjectArray getDeclaredAnnotations(jint, jint, jint);
|
||||
jobjectArray getDeclaredAnnotations(::java::lang::reflect::Method *,
|
||||
jboolean);
|
||||
jobjectArray getDeclaredAnnotations(::java::lang::reflect::Constructor *,
|
||||
jboolean);
|
||||
jobjectArray getDeclaredAnnotations(::java::lang::reflect::Field *);
|
||||
JArray< ::java::lang::annotation::Annotation *> *getDeclaredAnnotationsInternal();
|
||||
|
||||
jboolean isEnum (void)
|
||||
{
|
||||
return (accflags & 0x4000) != 0;
|
||||
}
|
||||
jboolean isSynthetic (void)
|
||||
{
|
||||
return (accflags & 0x1000) != 0;
|
||||
}
|
||||
jboolean isAnnotation (void)
|
||||
{
|
||||
return (accflags & 0x2000) != 0;
|
||||
}
|
||||
|
||||
jboolean isAnonymousClass();
|
||||
jboolean isLocalClass();
|
||||
jboolean isMemberClass();
|
||||
|
||||
// FIXME: this probably shouldn't be public.
|
||||
jint size (void)
|
||||
@@ -428,6 +479,20 @@ public:
|
||||
// types. See prims.cc.
|
||||
Class ();
|
||||
|
||||
// Given the BC ABI version, return the size of an Class initializer.
|
||||
static jlong initializerSize (jlong ABI)
|
||||
{
|
||||
unsigned long version = ABI & 0xfffff;
|
||||
int abi_rev = version % 100;
|
||||
|
||||
// The reflection_data field was added by abi_rev 1.
|
||||
if (abi_rev == 0)
|
||||
return ((char*)(&::java::lang::Class::class$.reflection_data)
|
||||
- (char*)&::java::lang::Class::class$);
|
||||
|
||||
return sizeof (::java::lang::Class);
|
||||
}
|
||||
|
||||
static java::lang::Class class$;
|
||||
|
||||
private:
|
||||
@@ -444,6 +509,9 @@ private:
|
||||
notifyAll ();
|
||||
}
|
||||
|
||||
jint findInnerClassAttribute();
|
||||
jint findDeclaredClasses(JArray<jclass> *, jboolean, jint);
|
||||
|
||||
// Friend functions implemented in natClass.cc.
|
||||
friend _Jv_Method *::_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
|
||||
_Jv_Utf8Const *signature);
|
||||
@@ -562,6 +630,11 @@ private:
|
||||
|
||||
friend void ::_Jv_CopyClassesToSystemLoader (gnu::gcj::runtime::SystemClassLoader *);
|
||||
|
||||
friend class java::lang::reflect::Field;
|
||||
friend class java::lang::reflect::Method;
|
||||
friend class java::lang::reflect::Constructor;
|
||||
friend class java::lang::reflect::VMProxy;
|
||||
|
||||
// Chain for class pool. This also doubles as the ABI version
|
||||
// number. It is only used for this purpose at class registration
|
||||
// time, and only for precompiled classes.
|
||||
@@ -644,6 +717,8 @@ private:
|
||||
void *aux_info;
|
||||
// Execution engine.
|
||||
_Jv_ExecutionEngine *engine;
|
||||
// Reflection data.
|
||||
unsigned char *reflection_data;
|
||||
};
|
||||
|
||||
// Inline functions that are friends of java::lang::Class
|
||||
|
||||
+397
-95
@@ -38,12 +38,14 @@ exception statement from your version. */
|
||||
|
||||
package java.lang;
|
||||
|
||||
import gnu.java.lang.reflect.ClassSignatureParser;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.GenericDeclaration;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Member;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Type;
|
||||
@@ -53,6 +55,11 @@ import java.security.ProtectionDomain;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Collection;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.annotation.Inherited;
|
||||
|
||||
/**
|
||||
* A Class represents a Java type. There will never be multiple Class
|
||||
@@ -83,7 +90,8 @@ import java.util.HashSet;
|
||||
* @since 1.0
|
||||
* @see ClassLoader
|
||||
*/
|
||||
public final class Class implements Type, GenericDeclaration, Serializable
|
||||
public final class Class<T>
|
||||
implements Type, AnnotatedElement, GenericDeclaration, Serializable
|
||||
{
|
||||
/**
|
||||
* Class is non-instantiable from Java code; only the VM can create
|
||||
@@ -112,7 +120,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @throws ExceptionInInitializerError if the class loads, but an exception
|
||||
* occurs during initialization
|
||||
*/
|
||||
public static native Class forName (String className)
|
||||
public static native Class<?> forName (String className)
|
||||
throws ClassNotFoundException;
|
||||
|
||||
// A private internal method that is called by compiler-generated code.
|
||||
@@ -147,8 +155,8 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @see ClassLoader
|
||||
* @since 1.2
|
||||
*/
|
||||
public static native Class forName (String className, boolean initialize,
|
||||
ClassLoader loader)
|
||||
public static native Class<?> forName (String className, boolean initialize,
|
||||
ClassLoader loader)
|
||||
throws ClassNotFoundException;
|
||||
|
||||
/**
|
||||
@@ -163,7 +171,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @throws SecurityException if the security check fails
|
||||
* @since 1.1
|
||||
*/
|
||||
public Class[] getClasses()
|
||||
public Class<?>[] getClasses()
|
||||
{
|
||||
memberAccessCheck(Member.PUBLIC);
|
||||
return internalGetClasses();
|
||||
@@ -172,16 +180,16 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
/**
|
||||
* Like <code>getClasses()</code> but without the security checks.
|
||||
*/
|
||||
private Class[] internalGetClasses()
|
||||
private Class<?>[] internalGetClasses()
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
ArrayList<Class> list = new ArrayList<Class>();
|
||||
list.addAll(Arrays.asList(getDeclaredClasses(true)));
|
||||
Class superClass = getSuperclass();
|
||||
if (superClass != null)
|
||||
list.addAll(Arrays.asList(superClass.internalGetClasses()));
|
||||
return (Class[])list.toArray(new Class[list.size()]);
|
||||
return list.toArray(new Class<?>[list.size()]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the ClassLoader that loaded this class. If the class was loaded
|
||||
* by the bootstrap classloader, this method will return null.
|
||||
@@ -216,7 +224,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @see Array
|
||||
* @since 1.1
|
||||
*/
|
||||
public native Class getComponentType ();
|
||||
public native Class<?> getComponentType ();
|
||||
|
||||
/**
|
||||
* Get a public constructor declared in this class. If the constructor takes
|
||||
@@ -232,7 +240,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @see #getConstructors()
|
||||
* @since 1.1
|
||||
*/
|
||||
public native Constructor getConstructor(Class[] args)
|
||||
public native Constructor<T> getConstructor(Class<?>... args)
|
||||
throws NoSuchMethodException;
|
||||
|
||||
/**
|
||||
@@ -247,7 +255,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @throws SecurityException if the security check fails
|
||||
* @since 1.1
|
||||
*/
|
||||
public Constructor[] getConstructors()
|
||||
public Constructor<?>[] getConstructors()
|
||||
{
|
||||
memberAccessCheck(Member.PUBLIC);
|
||||
return getDeclaredConstructors(true);
|
||||
@@ -267,7 +275,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @see #getDeclaredConstructors()
|
||||
* @since 1.1
|
||||
*/
|
||||
public native Constructor getDeclaredConstructor(Class[] args)
|
||||
public native Constructor<T> getDeclaredConstructor(Class<?>... args)
|
||||
throws NoSuchMethodException;
|
||||
|
||||
/**
|
||||
@@ -282,13 +290,13 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @throws SecurityException if the security check fails
|
||||
* @since 1.1
|
||||
*/
|
||||
public Class[] getDeclaredClasses()
|
||||
public Class<?>[] getDeclaredClasses()
|
||||
{
|
||||
memberAccessCheck(Member.DECLARED);
|
||||
return getDeclaredClasses(false);
|
||||
}
|
||||
|
||||
native Class[] getDeclaredClasses (boolean publicOnly);
|
||||
native Class<?>[] getDeclaredClasses (boolean publicOnly);
|
||||
|
||||
/**
|
||||
* Get all the declared constructors of this class. This returns an array of
|
||||
@@ -302,13 +310,13 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @throws SecurityException if the security check fails
|
||||
* @since 1.1
|
||||
*/
|
||||
public Constructor[] getDeclaredConstructors()
|
||||
public Constructor<?>[] getDeclaredConstructors()
|
||||
{
|
||||
memberAccessCheck(Member.DECLARED);
|
||||
return getDeclaredConstructors(false);
|
||||
}
|
||||
|
||||
native Constructor[] getDeclaredConstructors (boolean publicOnly);
|
||||
native Constructor<?>[] getDeclaredConstructors (boolean publicOnly);
|
||||
|
||||
/**
|
||||
* Get a field declared in this class, where name is its simple name. The
|
||||
@@ -369,7 +377,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @see #getDeclaredMethods()
|
||||
* @since 1.1
|
||||
*/
|
||||
public Method getDeclaredMethod(String methodName, Class[] args)
|
||||
public Method getDeclaredMethod(String methodName, Class<?>... args)
|
||||
throws NoSuchMethodException
|
||||
{
|
||||
memberAccessCheck(Member.DECLARED);
|
||||
@@ -409,7 +417,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @since 1.1
|
||||
*/
|
||||
// This is marked as unimplemented in the JCL book.
|
||||
public native Class getDeclaringClass ();
|
||||
public native Class<?> getDeclaringClass ();
|
||||
|
||||
private native Field getField (String fieldName, int hash)
|
||||
throws NoSuchFieldException;
|
||||
@@ -498,7 +506,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
*
|
||||
* @return the interfaces this class directly implements
|
||||
*/
|
||||
public native Class[] getInterfaces ();
|
||||
public native Class<?>[] getInterfaces ();
|
||||
|
||||
private final native void getSignature(StringBuffer buffer);
|
||||
private static final native String getSignature(Class[] args,
|
||||
@@ -528,7 +536,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @see #getMethods()
|
||||
* @since 1.1
|
||||
*/
|
||||
public Method getMethod(String methodName, Class[] args)
|
||||
public Method getMethod(String methodName, Class<?>... args)
|
||||
throws NoSuchMethodException
|
||||
{
|
||||
memberAccessCheck(Member.PUBLIC);
|
||||
@@ -701,7 +709,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
*
|
||||
* @return the direct superclass of this class
|
||||
*/
|
||||
public native Class getSuperclass ();
|
||||
public native Class<? super T> getSuperclass ();
|
||||
|
||||
/**
|
||||
* Return whether this class is an array type.
|
||||
@@ -725,7 +733,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @throws NullPointerException if c is null
|
||||
* @since 1.1
|
||||
*/
|
||||
public native boolean isAssignableFrom (Class c);
|
||||
public native boolean isAssignableFrom (Class<?> c);
|
||||
|
||||
/**
|
||||
* Discover whether an Object is an instance of this Class. Think of it
|
||||
@@ -783,7 +791,7 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
* @throws ExceptionInInitializerError if class initialization caused by
|
||||
* this call fails with an exception
|
||||
*/
|
||||
public native Object newInstance ()
|
||||
public native T newInstance ()
|
||||
throws InstantiationException, IllegalAccessException;
|
||||
|
||||
// We need a native method to retrieve the protection domain, because we
|
||||
@@ -930,6 +938,123 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Casts this class to represent a subclass of the specified class.
|
||||
* This method is useful for `narrowing' the type of a class so that
|
||||
* the class object, and instances of that class, can match the contract
|
||||
* of a more restrictive method. For example, if this class has the
|
||||
* static type of <code>Class<Object></code>, and a dynamic type of
|
||||
* <code>Class<Rectangle></code>, then, assuming <code>Shape</code> is
|
||||
* a superclass of <code>Rectangle</code>, this method can be used on
|
||||
* this class with the parameter, <code>Class<Shape></code>, to retain
|
||||
* the same instance but with the type
|
||||
* <code>Class<? extends Shape></code>.
|
||||
* </p>
|
||||
* <p>
|
||||
* If this class can be converted to an instance which is parameterised
|
||||
* over a subtype of the supplied type, <code>U</code>, then this method
|
||||
* returns an appropriately cast reference to this object. Otherwise,
|
||||
* a <code>ClassCastException</code> is thrown.
|
||||
* </p>
|
||||
*
|
||||
* @param klass the class object, the parameterized type (<code>U</code>) of
|
||||
* which should be a superclass of the parameterized type of
|
||||
* this instance.
|
||||
* @return a reference to this object, appropriately cast.
|
||||
* @throws ClassCastException if this class can not be converted to one
|
||||
* which represents a subclass of the specified
|
||||
* type, <code>U</code>.
|
||||
* @since 1.5
|
||||
*/
|
||||
public <U> Class<? extends U> asSubclass(Class<U> klass)
|
||||
{
|
||||
if (! klass.isAssignableFrom(this))
|
||||
throw new ClassCastException();
|
||||
return (Class<? extends U>) this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the specified object, cast to this <code>Class</code>' type.
|
||||
*
|
||||
* @param obj the object to cast
|
||||
* @throws ClassCastException if obj is not an instance of this class
|
||||
* @since 1.5
|
||||
*/
|
||||
public T cast(Object obj)
|
||||
{
|
||||
if (obj != null && ! isInstance(obj))
|
||||
throw new ClassCastException();
|
||||
return (T) obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the enumeration constants of this class, or
|
||||
* null if this class is not an <code>Enum</code>.
|
||||
*
|
||||
* @return an array of <code>Enum</code> constants
|
||||
* associated with this class, or null if this
|
||||
* class is not an <code>enum</code>.
|
||||
* @since 1.5
|
||||
*/
|
||||
public T[] getEnumConstants()
|
||||
{
|
||||
if (isEnum())
|
||||
{
|
||||
try
|
||||
{
|
||||
return (T[]) getMethod("values").invoke(null);
|
||||
}
|
||||
catch (NoSuchMethodException exception)
|
||||
{
|
||||
throw new Error("Enum lacks values() method");
|
||||
}
|
||||
catch (IllegalAccessException exception)
|
||||
{
|
||||
throw new Error("Unable to access Enum class");
|
||||
}
|
||||
catch (InvocationTargetException exception)
|
||||
{
|
||||
throw new
|
||||
RuntimeException("The values method threw an exception",
|
||||
exception);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this class is an <code>Enum</code>.
|
||||
*
|
||||
* @return true if this is an enumeration class.
|
||||
* @since 1.5
|
||||
*/
|
||||
public native boolean isEnum();
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if this class is a synthetic class, generated by
|
||||
* the compiler.
|
||||
*
|
||||
* @return true if this is a synthetic class.
|
||||
* @since 1.5
|
||||
*/
|
||||
public native boolean isSynthetic();
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if this class is an <code>Annotation</code>.
|
||||
*
|
||||
* @return true if this is an annotation class.
|
||||
* @since 1.5
|
||||
*/
|
||||
public native boolean isAnnotation();
|
||||
|
||||
|
||||
/**
|
||||
* Returns the simple name for this class, as used in the source
|
||||
* code. For normal classes, this is the content returned by
|
||||
@@ -945,8 +1070,224 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
*/
|
||||
public String getSimpleName()
|
||||
{
|
||||
// FIXME write real implementation
|
||||
return "";
|
||||
StringBuffer sb = new StringBuffer();
|
||||
Class klass = this;
|
||||
int arrayCount = 0;
|
||||
while (klass.isArray())
|
||||
{
|
||||
klass = klass.getComponentType();
|
||||
++arrayCount;
|
||||
}
|
||||
if (! klass.isAnonymousClass())
|
||||
{
|
||||
String fullName = klass.getName();
|
||||
sb.append(fullName, fullName.lastIndexOf(".") + 1, fullName.length());
|
||||
}
|
||||
while (arrayCount-- > 0)
|
||||
sb.append("[]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the class which immediately encloses this class. If this class
|
||||
* is a top-level class, this method returns <code>null</code>.
|
||||
*
|
||||
* @return the immediate enclosing class, or <code>null</code> if this is
|
||||
* a top-level class.
|
||||
* @since 1.5
|
||||
*/
|
||||
public native Class<?> getEnclosingClass();
|
||||
|
||||
/**
|
||||
* Returns the constructor which immediately encloses this class. If
|
||||
* this class is a top-level class, or a local or anonymous class
|
||||
* immediately enclosed by a type definition, instance initializer
|
||||
* or static initializer, then <code>null</code> is returned.
|
||||
*
|
||||
* @return the immediate enclosing constructor if this class is
|
||||
* declared within a constructor. Otherwise, <code>null</code>
|
||||
* is returned.
|
||||
* @since 1.5
|
||||
*/
|
||||
public native Constructor<T> getEnclosingConstructor();
|
||||
|
||||
/**
|
||||
* Returns the method which immediately encloses this class. If
|
||||
* this class is a top-level class, or a local or anonymous class
|
||||
* immediately enclosed by a type definition, instance initializer
|
||||
* or static initializer, then <code>null</code> is returned.
|
||||
*
|
||||
* @return the immediate enclosing method if this class is
|
||||
* declared within a method. Otherwise, <code>null</code>
|
||||
* is returned.
|
||||
* @since 1.5
|
||||
*/
|
||||
public native Method getEnclosingMethod();
|
||||
|
||||
private native String getClassSignature();
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Returns an array of <code>Type</code> objects which represent the
|
||||
* interfaces directly implemented by this class or extended by this
|
||||
* interface.
|
||||
* </p>
|
||||
* <p>
|
||||
* If one of the superinterfaces is a parameterized type, then the
|
||||
* object returned for this interface reflects the actual type
|
||||
* parameters used in the source code. Type parameters are created
|
||||
* using the semantics specified by the <code>ParameterizedType</code>
|
||||
* interface, and only if an instance has not already been created.
|
||||
* </p>
|
||||
* <p>
|
||||
* The order of the interfaces in the array matches the order in which
|
||||
* the interfaces are declared. For classes which represent an array,
|
||||
* an array of two interfaces, <code>Cloneable</code> and
|
||||
* <code>Serializable</code>, is always returned, with the objects in
|
||||
* that order. A class representing a primitive type or void always
|
||||
* returns an array of zero size.
|
||||
* </p>
|
||||
*
|
||||
* @return an array of interfaces implemented or extended by this class.
|
||||
* @throws GenericSignatureFormatError if the generic signature of one
|
||||
* of the interfaces does not comply with that specified by the Java
|
||||
* Virtual Machine specification, 3rd edition.
|
||||
* @throws TypeNotPresentException if any of the superinterfaces refers
|
||||
* to a non-existant type.
|
||||
* @throws MalformedParameterizedTypeException if any of the interfaces
|
||||
* refer to a parameterized type that can not be instantiated for
|
||||
* some reason.
|
||||
* @since 1.5
|
||||
* @see java.lang.reflect.ParameterizedType
|
||||
*/
|
||||
public Type[] getGenericInterfaces()
|
||||
{
|
||||
if (isPrimitive())
|
||||
return new Type[0];
|
||||
|
||||
String sig = getClassSignature();
|
||||
if (sig == null)
|
||||
return getInterfaces();
|
||||
|
||||
ClassSignatureParser p = new ClassSignatureParser(this, sig);
|
||||
return p.getInterfaceTypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Returns a <code>Type</code> object representing the direct superclass,
|
||||
* whether class, interface, primitive type or void, of this class.
|
||||
* If this class is an array class, then a class instance representing
|
||||
* the <code>Object</code> class is returned. If this class is primitive,
|
||||
* an interface, or a representation of either the <code>Object</code>
|
||||
* class or void, then <code>null</code> is returned.
|
||||
* </p>
|
||||
* <p>
|
||||
* If the superclass is a parameterized type, then the
|
||||
* object returned for this interface reflects the actual type
|
||||
* parameters used in the source code. Type parameters are created
|
||||
* using the semantics specified by the <code>ParameterizedType</code>
|
||||
* interface, and only if an instance has not already been created.
|
||||
* </p>
|
||||
*
|
||||
* @return the superclass of this class.
|
||||
* @throws GenericSignatureFormatError if the generic signature of the
|
||||
* class does not comply with that specified by the Java
|
||||
* Virtual Machine specification, 3rd edition.
|
||||
* @throws TypeNotPresentException if the superclass refers
|
||||
* to a non-existant type.
|
||||
* @throws MalformedParameterizedTypeException if the superclass
|
||||
* refers to a parameterized type that can not be instantiated for
|
||||
* some reason.
|
||||
* @since 1.5
|
||||
* @see java.lang.reflect.ParameterizedType
|
||||
*/
|
||||
public Type getGenericSuperclass()
|
||||
{
|
||||
if (isArray())
|
||||
return Object.class;
|
||||
|
||||
if (isPrimitive() || isInterface() || this == Object.class)
|
||||
return null;
|
||||
|
||||
String sig = getClassSignature();
|
||||
if (sig == null)
|
||||
return getSuperclass();
|
||||
|
||||
ClassSignatureParser p = new ClassSignatureParser(this, sig);
|
||||
return p.getSuperclassType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of <code>TypeVariable</code> objects that represents
|
||||
* the type variables declared by this class, in declaration order.
|
||||
* An array of size zero is returned if this class has no type
|
||||
* variables.
|
||||
*
|
||||
* @return the type variables associated with this class.
|
||||
* @throws GenericSignatureFormatError if the generic signature does
|
||||
* not conform to the format specified in the Virtual Machine
|
||||
* specification, version 3.
|
||||
* @since 1.5
|
||||
*/
|
||||
public TypeVariable<Class<T>>[] getTypeParameters()
|
||||
{
|
||||
String sig = getClassSignature();
|
||||
if (sig == null)
|
||||
return (TypeVariable<Class<T>>[])new TypeVariable[0];
|
||||
|
||||
ClassSignatureParser p = new ClassSignatureParser(this, sig);
|
||||
return p.getTypeParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this class' annotation for the specified annotation type,
|
||||
* or <code>null</code> if no such annotation exists.
|
||||
*
|
||||
* @param annotationClass the type of annotation to look for.
|
||||
* @return this class' annotation for the specified type, or
|
||||
* <code>null</code> if no such annotation exists.
|
||||
* @since 1.5
|
||||
*/
|
||||
public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
|
||||
{
|
||||
A foundAnnotation = null;
|
||||
Annotation[] annotations = getAnnotations();
|
||||
for (Annotation annotation : annotations)
|
||||
if (annotation.annotationType() == annotationClass)
|
||||
foundAnnotation = (A) annotation;
|
||||
return foundAnnotation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all annotations associated with this class. If there are
|
||||
* no annotations associated with this class, then a zero-length array
|
||||
* will be returned. The returned array may be modified by the client
|
||||
* code, but this will have no effect on the annotation content of this
|
||||
* class, and hence no effect on the return value of this method for
|
||||
* future callers.
|
||||
*
|
||||
* @return this class' annotations.
|
||||
* @since 1.5
|
||||
*/
|
||||
public Annotation[] getAnnotations()
|
||||
{
|
||||
HashMap<Class, Annotation> map = new HashMap<Class, Annotation>();
|
||||
for (Annotation a : getDeclaredAnnotations())
|
||||
map.put((Class) a.annotationType(), a);
|
||||
for (Class<? super T> s = getSuperclass();
|
||||
s != null;
|
||||
s = s.getSuperclass())
|
||||
{
|
||||
for (Annotation a : s.getDeclaredAnnotations())
|
||||
{
|
||||
Class k = (Class) a.annotationType();
|
||||
if (! map.containsKey(k) && k.isAnnotationPresent(Inherited.class))
|
||||
map.put(k, a);
|
||||
}
|
||||
}
|
||||
Collection<Annotation> v = map.values();
|
||||
return v.toArray(new Annotation[v.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -962,89 +1303,50 @@ public final class Class implements Type, GenericDeclaration, Serializable
|
||||
*/
|
||||
public Annotation[] getDeclaredAnnotations()
|
||||
{
|
||||
// FIXME write real implementation
|
||||
return new Annotation[0];
|
||||
Annotation[] result = getDeclaredAnnotationsInternal();
|
||||
if (result == null)
|
||||
result = new Annotation[0];
|
||||
return result;
|
||||
}
|
||||
|
||||
private native Annotation[] getDeclaredAnnotationsInternal();
|
||||
|
||||
/**
|
||||
* Returns true if an annotation for the specified type is associated
|
||||
* with this class. This is primarily a short-hand for using marker
|
||||
* annotations.
|
||||
*
|
||||
* @param annotationClass the type of annotation to look for.
|
||||
* @return true if an annotation exists for the specified type.
|
||||
* @since 1.5
|
||||
*/
|
||||
public boolean isAnnotationPresent(Class<? extends Annotation>
|
||||
annotationClass)
|
||||
{
|
||||
return getAnnotation(annotationClass) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the class which immediately encloses this class. If this class
|
||||
* is a top-level class, this method returns <code>null</code>.
|
||||
* Returns true if this object represents an anonymous class.
|
||||
*
|
||||
* @return the immediate enclosing class, or <code>null</code> if this is
|
||||
* a top-level class.
|
||||
* @return true if this object represents an anonymous class.
|
||||
* @since 1.5
|
||||
*/
|
||||
/* FIXME[GENERICS]: Should return Class<?> */
|
||||
public Class getEnclosingClass()
|
||||
{
|
||||
// FIXME write real implementation
|
||||
return null;
|
||||
}
|
||||
public native boolean isAnonymousClass();
|
||||
|
||||
/**
|
||||
* Returns the constructor which immediately encloses this class. If
|
||||
* this class is a top-level class, or a local or anonymous class
|
||||
* immediately enclosed by a type definition, instance initializer
|
||||
* or static initializer, then <code>null</code> is returned.
|
||||
* Returns true if this object represents an local class.
|
||||
*
|
||||
* @return the immediate enclosing constructor if this class is
|
||||
* declared within a constructor. Otherwise, <code>null</code>
|
||||
* is returned.
|
||||
* @return true if this object represents an local class.
|
||||
* @since 1.5
|
||||
*/
|
||||
/* FIXME[GENERICS]: Should return Constructor<?> */
|
||||
public Constructor getEnclosingConstructor()
|
||||
{
|
||||
// FIXME write real implementation
|
||||
return null;
|
||||
}
|
||||
public native boolean isLocalClass();
|
||||
|
||||
/**
|
||||
* Returns the method which immediately encloses this class. If
|
||||
* this class is a top-level class, or a local or anonymous class
|
||||
* immediately enclosed by a type definition, instance initializer
|
||||
* or static initializer, then <code>null</code> is returned.
|
||||
* Returns true if this object represents an member class.
|
||||
*
|
||||
* @return the immediate enclosing method if this class is
|
||||
* declared within a method. Otherwise, <code>null</code>
|
||||
* is returned.
|
||||
* @return true if this object represents an member class.
|
||||
* @since 1.5
|
||||
*/
|
||||
public Method getEnclosingMethod()
|
||||
{
|
||||
// FIXME write real implementation
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of <code>TypeVariable</code> objects that represents
|
||||
* the type variables declared by this class, in declaration order.
|
||||
* An array of size zero is returned if this class has no type
|
||||
* variables.
|
||||
*
|
||||
* @return the type variables associated with this class.
|
||||
* @throws GenericSignatureFormatError if the generic signature does
|
||||
* not conform to the format specified in the Virtual Machine
|
||||
* specification, version 3.
|
||||
* @since 1.5
|
||||
*/
|
||||
/* FIXME[GENERICS]: Should return TypeVariable<Class<T>> */
|
||||
public TypeVariable[] getTypeParameters()
|
||||
{
|
||||
// FIXME - provide real implementation.
|
||||
return new TypeVariable[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this class is an <code>Enum</code>.
|
||||
*
|
||||
* @return true if this is an enumeration class.
|
||||
* @since 1.5
|
||||
*/
|
||||
public boolean isEnum()
|
||||
{
|
||||
// FIXME - provide real implementation.
|
||||
return false;
|
||||
}
|
||||
|
||||
public native boolean isMemberClass();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ClassCastException__
|
||||
#define __java_lang_ClassCastException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::ClassCastException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
ClassCastException();
|
||||
ClassCastException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -9223365651070458532LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ClassCastException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ClassCircularityError__
|
||||
#define __java_lang_ClassCircularityError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/LinkageError.h>
|
||||
|
||||
class java::lang::ClassCircularityError : public ::java::lang::LinkageError
|
||||
{
|
||||
|
||||
public:
|
||||
ClassCircularityError();
|
||||
ClassCircularityError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 1054362542914539689LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ClassCircularityError__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ClassFormatError__
|
||||
#define __java_lang_ClassFormatError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/LinkageError.h>
|
||||
|
||||
class java::lang::ClassFormatError : public ::java::lang::LinkageError
|
||||
{
|
||||
|
||||
public:
|
||||
ClassFormatError();
|
||||
ClassFormatError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -8420114879011949195LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ClassFormatError__
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ClassLoader$AnnotationsKey__
|
||||
#define __java_lang_ClassLoader$AnnotationsKey__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::ClassLoader$AnnotationsKey : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
ClassLoader$AnnotationsKey(::java::lang::Class *, jint, jint, jint);
|
||||
jboolean equals(::java::lang::Object *);
|
||||
jint hashCode();
|
||||
public: // actually package-private
|
||||
jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) member_type;
|
||||
jint member_index;
|
||||
jint kind_req;
|
||||
::java::lang::Class * declaringClass;
|
||||
jint hashCode__;
|
||||
public:
|
||||
static JArray< ::java::lang::annotation::Annotation * > * NIL;
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ClassLoader$AnnotationsKey__
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ClassLoader__
|
||||
#define __java_lang_ClassLoader__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
extern "Java"
|
||||
{
|
||||
namespace java
|
||||
{
|
||||
namespace net
|
||||
{
|
||||
class URL;
|
||||
}
|
||||
namespace nio
|
||||
{
|
||||
class ByteBuffer;
|
||||
}
|
||||
namespace security
|
||||
{
|
||||
class ProtectionDomain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);
|
||||
void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);
|
||||
|
||||
class java::lang::ClassLoader : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public: // actually package-private
|
||||
virtual JArray< ::java::lang::Object * > * getDeclaredAnnotations(::java::lang::Class *, jint, jint, jint);
|
||||
virtual JArray< ::java::lang::Object * > * putDeclaredAnnotations(::java::lang::Class *, jint, jint, jint, JArray< ::java::lang::Object * > *);
|
||||
public: // actually protected
|
||||
ClassLoader();
|
||||
ClassLoader(::java::lang::ClassLoader *);
|
||||
public:
|
||||
virtual ::java::lang::Class * loadClass(::java::lang::String *);
|
||||
private:
|
||||
::java::lang::Class * loadClassFromSig(::java::lang::String *);
|
||||
public: // actually protected
|
||||
virtual ::java::lang::Class * loadClass(::java::lang::String *, jboolean);
|
||||
virtual ::java::lang::Class * findClass(::java::lang::String *);
|
||||
virtual ::java::lang::Class * defineClass(JArray< jbyte > *, jint, jint);
|
||||
virtual ::java::lang::Class * defineClass(::java::lang::String *, JArray< jbyte > *, jint, jint);
|
||||
virtual ::java::lang::Class * defineClass(::java::lang::String *, JArray< jbyte > *, jint, jint, ::java::security::ProtectionDomain *);
|
||||
virtual ::java::lang::Class * defineClass(::java::lang::String *, ::java::nio::ByteBuffer *, ::java::security::ProtectionDomain *);
|
||||
virtual void resolveClass(::java::lang::Class *);
|
||||
virtual ::java::lang::Class * findSystemClass(::java::lang::String *);
|
||||
public:
|
||||
virtual ::java::lang::ClassLoader * getParent();
|
||||
public: // actually protected
|
||||
virtual void setSigners(::java::lang::Class *, JArray< ::java::lang::Object * > *);
|
||||
virtual ::java::lang::Class * findLoadedClass(::java::lang::String *);
|
||||
public:
|
||||
virtual ::java::net::URL * getResource(::java::lang::String *);
|
||||
virtual ::java::util::Enumeration * getResources(::java::lang::String *);
|
||||
public: // actually protected
|
||||
virtual ::java::util::Enumeration * findResources(::java::lang::String *);
|
||||
virtual ::java::net::URL * findResource(::java::lang::String *);
|
||||
public:
|
||||
static ::java::net::URL * getSystemResource(::java::lang::String *);
|
||||
static ::java::util::Enumeration * getSystemResources(::java::lang::String *);
|
||||
virtual ::java::io::InputStream * getResourceAsStream(::java::lang::String *);
|
||||
static ::java::io::InputStream * getSystemResourceAsStream(::java::lang::String *);
|
||||
static ::java::lang::ClassLoader * getSystemClassLoader();
|
||||
public: // actually protected
|
||||
virtual ::java::lang::Package * definePackage(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::net::URL *);
|
||||
virtual ::java::lang::Package * getPackage(::java::lang::String *);
|
||||
virtual JArray< ::java::lang::Package * > * getPackages();
|
||||
virtual ::java::lang::String * findLibrary(::java::lang::String *);
|
||||
public:
|
||||
virtual void setDefaultAssertionStatus(jboolean);
|
||||
virtual void setPackageAssertionStatus(::java::lang::String *, jboolean);
|
||||
virtual void setClassAssertionStatus(::java::lang::String *, jboolean);
|
||||
virtual void clearAssertionStatus();
|
||||
public: // actually package-private
|
||||
virtual jboolean isAncestorOf(::java::lang::ClassLoader *);
|
||||
::java::util::HashMap * __attribute__((aligned(__alignof__( ::java::lang::Object)))) loadedClasses;
|
||||
::java::util::HashMap * definedPackages;
|
||||
private:
|
||||
::java::lang::ClassLoader * parent;
|
||||
jboolean initialized;
|
||||
public: // actually package-private
|
||||
static ::java::lang::ClassLoader * systemClassLoader;
|
||||
private:
|
||||
::java::util::concurrent::ConcurrentHashMap * declaredAnnotations;
|
||||
public: // actually package-private
|
||||
static ::java::security::ProtectionDomain * defaultProtectionDomain;
|
||||
jboolean defaultAssertionStatus;
|
||||
static ::java::util::Map * systemPackageAssertionStatus;
|
||||
::java::util::Map * packageAssertionStatus;
|
||||
static ::java::util::Map * systemClassAssertionStatus;
|
||||
::java::util::Map * classAssertionStatus;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
|
||||
friend jclass (::_Jv_FindClass) (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);
|
||||
friend void ::_Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);
|
||||
};
|
||||
|
||||
#endif // __java_lang_ClassLoader__
|
||||
@@ -39,12 +39,14 @@ exception statement from your version. */
|
||||
package java.lang;
|
||||
|
||||
import gnu.classpath.SystemProperties;
|
||||
import gnu.classpath.VMStackWalker;
|
||||
import gnu.java.util.DoubleEnumeration;
|
||||
import gnu.java.util.EmptyEnumeration;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.security.CodeSource;
|
||||
import java.security.PermissionCollection;
|
||||
import java.security.Policy;
|
||||
@@ -53,6 +55,9 @@ import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
/**
|
||||
* The ClassLoader is a way of customizing the way Java gets its classes
|
||||
* and loads them into memory. The verifier and other standard Java things
|
||||
@@ -157,6 +162,85 @@ public abstract class ClassLoader
|
||||
static final ClassLoader systemClassLoader =
|
||||
VMClassLoader.getSystemClassLoader();
|
||||
|
||||
/**
|
||||
* This cache maps from a Class to its associated annotations. It's
|
||||
* declared here so that when this class loader becomes unreachable,
|
||||
* so will the corresponding cache.
|
||||
*/
|
||||
|
||||
private final ConcurrentHashMap<AnnotationsKey,Object[]>
|
||||
declaredAnnotations
|
||||
= new ConcurrentHashMap<AnnotationsKey,Object[]>();
|
||||
|
||||
static final class AnnotationsKey
|
||||
{
|
||||
final int /* jv_attr_type */ member_type;
|
||||
final int member_index;
|
||||
final int /* jv_attr_kind */ kind_req;
|
||||
final Class declaringClass;
|
||||
final int hashCode;
|
||||
|
||||
public AnnotationsKey (Class declaringClass,
|
||||
int member_type,
|
||||
int member_index,
|
||||
int kind_req)
|
||||
{
|
||||
this.member_type = member_type;
|
||||
this.member_index = member_index;
|
||||
this.kind_req = kind_req;
|
||||
this.declaringClass = declaringClass;
|
||||
hashCode = (member_type ^ member_index ^ kind_req
|
||||
^ declaringClass.hashCode());
|
||||
}
|
||||
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
AnnotationsKey other = (AnnotationsKey)obj;
|
||||
return (this.member_type == other.member_type
|
||||
&& this.member_index == other.member_index
|
||||
&& this.kind_req == other.kind_req
|
||||
&& this.declaringClass == other.declaringClass);
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
public static final Annotation[] NIL = new Annotation[0];
|
||||
}
|
||||
|
||||
final Object[] getDeclaredAnnotations(Class declaringClass,
|
||||
int member_type,
|
||||
int member_index,
|
||||
int kind_req)
|
||||
{
|
||||
Object[] result
|
||||
= declaredAnnotations.get (new AnnotationsKey
|
||||
(declaringClass,
|
||||
member_type,
|
||||
member_index,
|
||||
kind_req));
|
||||
if (result != AnnotationsKey.NIL && result != null)
|
||||
return (Object[])result.clone();
|
||||
return null;
|
||||
}
|
||||
|
||||
final Object[] putDeclaredAnnotations(Class declaringClass,
|
||||
int member_type,
|
||||
int member_index,
|
||||
int kind_req,
|
||||
Object[] annotations)
|
||||
{
|
||||
declaredAnnotations.put
|
||||
(new AnnotationsKey
|
||||
(declaringClass, member_type,
|
||||
member_index, kind_req),
|
||||
annotations == null ? AnnotationsKey.NIL : annotations);
|
||||
|
||||
return annotations == null ? null : (Object[])annotations.clone();
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
// Find out if we have to install a default security manager. Note
|
||||
@@ -486,6 +570,35 @@ public abstract class ClassLoader
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to define a class using the contents of a byte buffer. If
|
||||
* the domain is null, the default of
|
||||
* <code>Policy.getPolicy().getPermissions(new CodeSource(null,
|
||||
* null))</code> is used. Once a class has been defined in a
|
||||
* package, all further classes in that package must have the same
|
||||
* set of certificates or a SecurityException is thrown.
|
||||
*
|
||||
* @param name the name to give the class. null if unknown
|
||||
* @param buf a byte buffer containing bytes that form a class.
|
||||
* @param domain the ProtectionDomain to give to the class, null for the
|
||||
* default protection domain
|
||||
* @return the class that was defined
|
||||
* @throws ClassFormatError if data is not in proper classfile format
|
||||
* @throws NoClassDefFoundError if the supplied name is not the same as
|
||||
* the one specified by the byte buffer.
|
||||
* @throws SecurityException if name starts with "java.", or if certificates
|
||||
* do not match up
|
||||
* @since 1.5
|
||||
*/
|
||||
protected final Class<?> defineClass(String name, ByteBuffer buf,
|
||||
ProtectionDomain domain)
|
||||
throws ClassFormatError
|
||||
{
|
||||
byte[] data = new byte[buf.remaining()];
|
||||
buf.get(data);
|
||||
return defineClass(name, data, 0, data.length, domain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Links the class, if that has not already been done. Linking basically
|
||||
* resolves all references to other classes made by this class.
|
||||
@@ -530,8 +643,7 @@ public abstract class ClassLoader
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null)
|
||||
{
|
||||
Class c = VMSecurityManager.getClassContext(ClassLoader.class)[0];
|
||||
ClassLoader cl = c.getClassLoader();
|
||||
ClassLoader cl = VMStackWalker.getCallingClassLoader();
|
||||
if (cl != null && ! cl.isAncestorOf(this))
|
||||
sm.checkPermission(new RuntimePermission("getClassLoader"));
|
||||
}
|
||||
@@ -744,14 +856,15 @@ public abstract class ClassLoader
|
||||
|
||||
/**
|
||||
* Returns the system classloader. The system classloader (also called
|
||||
* the application classloader) is the classloader that was used to
|
||||
* the application classloader) is the classloader that is used to
|
||||
* load the application classes on the classpath (given by the system
|
||||
* property <code>java.class.path</code>. This is set as the context
|
||||
* class loader for a thread. The system property
|
||||
* <code>java.system.class.loader</code>, if defined, is taken to be the
|
||||
* name of the class to use as the system class loader, which must have
|
||||
* a public constructor which takes a ClassLoader as a parent; otherwise this
|
||||
* uses gnu.java.lang.SystemClassLoader.
|
||||
* a public constructor which takes a ClassLoader as a parent. The parent
|
||||
* class loader passed in the constructor is the default system class
|
||||
* loader.
|
||||
*
|
||||
* <p>Note that this is different from the bootstrap classloader that
|
||||
* actually loads all the real "system" classes (the bootstrap classloader
|
||||
@@ -773,8 +886,7 @@ public abstract class ClassLoader
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null)
|
||||
{
|
||||
Class c = VMSecurityManager.getClassContext(ClassLoader.class)[0];
|
||||
ClassLoader cl = c.getClassLoader();
|
||||
ClassLoader cl = VMStackWalker.getCallingClassLoader();
|
||||
if (cl != null && cl != systemClassLoader)
|
||||
sm.checkPermission(new RuntimePermission("getClassLoader"));
|
||||
}
|
||||
@@ -898,7 +1010,7 @@ public abstract class ClassLoader
|
||||
*
|
||||
* @param name the (system specific) name of the requested library
|
||||
* @return the full pathname to the requested library, or null
|
||||
* @see Runtime#loadLibrary()
|
||||
* @see Runtime#loadLibrary(String)
|
||||
* @since 1.2
|
||||
*/
|
||||
protected String findLibrary(String name)
|
||||
@@ -928,7 +1040,7 @@ public abstract class ClassLoader
|
||||
*
|
||||
* @param name the package (and subpackages) to affect
|
||||
* @param enabled true to set the default to enabled
|
||||
* @see #setDefaultAssertionStatus(String, boolean)
|
||||
* @see #setDefaultAssertionStatus(boolean)
|
||||
* @see #setClassAssertionStatus(String, boolean)
|
||||
* @see #clearAssertionStatus()
|
||||
* @since 1.4
|
||||
@@ -949,7 +1061,7 @@ public abstract class ClassLoader
|
||||
* @param name the class to affect
|
||||
* @param enabled true to set the default to enabled
|
||||
* @throws NullPointerException if name is null
|
||||
* @see #setDefaultAssertionStatus(String, boolean)
|
||||
* @see #setDefaultAssertionStatus(boolean)
|
||||
* @see #setPackageAssertionStatus(String, boolean)
|
||||
* @see #clearAssertionStatus()
|
||||
* @since 1.4
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ClassNotFoundException__
|
||||
#define __java_lang_ClassNotFoundException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Exception.h>
|
||||
|
||||
class java::lang::ClassNotFoundException : public ::java::lang::Exception
|
||||
{
|
||||
|
||||
public:
|
||||
ClassNotFoundException();
|
||||
ClassNotFoundException(::java::lang::String *);
|
||||
ClassNotFoundException(::java::lang::String *, ::java::lang::Throwable *);
|
||||
virtual ::java::lang::Throwable * getException();
|
||||
virtual ::java::lang::Throwable * getCause();
|
||||
private:
|
||||
static const jlong serialVersionUID = 9176873029745254542LL;
|
||||
::java::lang::Throwable * __attribute__((aligned(__alignof__( ::java::lang::Exception)))) ex;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ClassNotFoundException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_CloneNotSupportedException__
|
||||
#define __java_lang_CloneNotSupportedException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Exception.h>
|
||||
|
||||
class java::lang::CloneNotSupportedException : public ::java::lang::Exception
|
||||
{
|
||||
|
||||
public:
|
||||
CloneNotSupportedException();
|
||||
CloneNotSupportedException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 5195511250079656443LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_CloneNotSupportedException__
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Cloneable__
|
||||
#define __java_lang_Cloneable__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Cloneable : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_Cloneable__
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Comparable__
|
||||
#define __java_lang_Comparable__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Comparable : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
virtual jint compareTo(::java::lang::Object *) = 0;
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_Comparable__
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Compiler__
|
||||
#define __java_lang_Compiler__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Compiler : public ::java::lang::Object
|
||||
{
|
||||
|
||||
Compiler();
|
||||
public:
|
||||
static jboolean compileClass(::java::lang::Class *);
|
||||
static jboolean compileClasses(::java::lang::String *);
|
||||
static ::java::lang::Object * command(::java::lang::Object *);
|
||||
static void enable();
|
||||
static void disable();
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Compiler__
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Deprecated__
|
||||
#define __java_lang_Deprecated__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Deprecated : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ::java::lang::Class * annotationType() = 0;
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_Deprecated__
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Double__
|
||||
#define __java_lang_Double__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Number.h>
|
||||
|
||||
class java::lang::Double : public ::java::lang::Number
|
||||
{
|
||||
|
||||
public:
|
||||
Double(jdouble);
|
||||
Double(::java::lang::String *);
|
||||
static ::java::lang::String * toString(jdouble);
|
||||
static ::java::lang::String * toHexString(jdouble);
|
||||
static ::java::lang::Double * valueOf(jdouble);
|
||||
static ::java::lang::Double * valueOf(::java::lang::String *);
|
||||
static jdouble parseDouble(::java::lang::String *);
|
||||
static jboolean isNaN(jdouble);
|
||||
static jboolean isInfinite(jdouble);
|
||||
jboolean isNaN();
|
||||
jboolean isInfinite();
|
||||
::java::lang::String * toString();
|
||||
jbyte byteValue();
|
||||
jshort shortValue();
|
||||
jint intValue();
|
||||
jlong longValue();
|
||||
jfloat floatValue();
|
||||
jdouble doubleValue();
|
||||
jint hashCode();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
static jlong doubleToLongBits(jdouble);
|
||||
static jlong doubleToRawLongBits(jdouble);
|
||||
static jdouble longBitsToDouble(jlong);
|
||||
jint target$compareTo(::java::lang::Double *);
|
||||
static jint compare(jdouble, jdouble);
|
||||
jint compareTo(::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -9172774392245257468LL;
|
||||
public:
|
||||
static jdouble MAX_VALUE;
|
||||
static jdouble MIN_VALUE;
|
||||
static jdouble NEGATIVE_INFINITY;
|
||||
static jdouble POSITIVE_INFINITY;
|
||||
static jdouble NaN;
|
||||
static const jint SIZE = 64;
|
||||
static ::java::lang::Class * TYPE;
|
||||
private:
|
||||
jdouble __attribute__((aligned(__alignof__( ::java::lang::Number)))) value;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Double__
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_EcosProcess__
|
||||
#define __java_lang_EcosProcess__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Process.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::EcosProcess : public ::java::lang::Process
|
||||
{
|
||||
|
||||
public:
|
||||
void destroy();
|
||||
jint exitValue();
|
||||
::java::io::InputStream * getErrorStream();
|
||||
::java::io::InputStream * getInputStream();
|
||||
::java::io::OutputStream * getOutputStream();
|
||||
jint waitFor();
|
||||
EcosProcess(JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, ::java::io::File *);
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_EcosProcess__
|
||||
@@ -1,6 +1,6 @@
|
||||
// EcosProcess.java - Subclass of Process for eCos systems.
|
||||
|
||||
/* Copyright (C) 1998, 1999 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2006 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
@@ -22,9 +22,7 @@ import java.io.IOException;
|
||||
|
||||
// This is entirely internal to our implementation.
|
||||
|
||||
// This file is copied to `ConcreteProcess.java' before compilation.
|
||||
// Hence the class name apparently does not match the file name.
|
||||
final class ConcreteProcess extends Process
|
||||
final class EcosProcess extends Process
|
||||
{
|
||||
// See natEcosProcess.cc to understand why this is native.
|
||||
public native void destroy ();
|
||||
@@ -53,7 +51,7 @@ final class ConcreteProcess extends Process
|
||||
return 0;
|
||||
}
|
||||
|
||||
public ConcreteProcess (String[] progarray,
|
||||
public EcosProcess (String[] progarray,
|
||||
String[] envp,
|
||||
File dir)
|
||||
throws IOException
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Enum__
|
||||
#define __java_lang_Enum__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Enum : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public: // actually protected
|
||||
Enum(::java::lang::String *, jint);
|
||||
public:
|
||||
static ::java::lang::Enum * valueOf(::java::lang::Class *, ::java::lang::String *);
|
||||
virtual jboolean equals(::java::lang::Object *);
|
||||
virtual jint hashCode();
|
||||
virtual ::java::lang::String * toString();
|
||||
virtual jint target$compareTo(::java::lang::Enum *);
|
||||
public: // actually protected
|
||||
virtual ::java::lang::Object * clone();
|
||||
public:
|
||||
virtual ::java::lang::String * name();
|
||||
virtual jint ordinal();
|
||||
virtual ::java::lang::Class * getDeclaringClass();
|
||||
virtual jint compareTo(::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -4300926546619394005LL;
|
||||
public: // actually package-private
|
||||
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) name__;
|
||||
jint ordinal__;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Enum__
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_EnumConstantNotPresentException__
|
||||
#define __java_lang_EnumConstantNotPresentException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::EnumConstantNotPresentException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
EnumConstantNotPresentException(::java::lang::Class *, ::java::lang::String *);
|
||||
virtual ::java::lang::String * constantName();
|
||||
virtual ::java::lang::Class * enumType();
|
||||
private:
|
||||
static const jlong serialVersionUID = -6046998521960521108LL;
|
||||
::java::lang::Class * __attribute__((aligned(__alignof__( ::java::lang::RuntimeException)))) enumType__;
|
||||
::java::lang::String * constantName__;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_EnumConstantNotPresentException__
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Error__
|
||||
#define __java_lang_Error__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Throwable.h>
|
||||
|
||||
class java::lang::Error : public ::java::lang::Throwable
|
||||
{
|
||||
|
||||
public:
|
||||
Error();
|
||||
Error(::java::lang::String *);
|
||||
Error(::java::lang::String *, ::java::lang::Throwable *);
|
||||
Error(::java::lang::Throwable *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 4980196508277280342LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Error__
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Exception__
|
||||
#define __java_lang_Exception__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Throwable.h>
|
||||
|
||||
class java::lang::Exception : public ::java::lang::Throwable
|
||||
{
|
||||
|
||||
public:
|
||||
Exception();
|
||||
Exception(::java::lang::String *);
|
||||
Exception(::java::lang::String *, ::java::lang::Throwable *);
|
||||
Exception(::java::lang::Throwable *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -3387516993124229948LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Exception__
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ExceptionInInitializerError__
|
||||
#define __java_lang_ExceptionInInitializerError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/LinkageError.h>
|
||||
|
||||
class java::lang::ExceptionInInitializerError : public ::java::lang::LinkageError
|
||||
{
|
||||
|
||||
public:
|
||||
ExceptionInInitializerError();
|
||||
ExceptionInInitializerError(::java::lang::String *);
|
||||
ExceptionInInitializerError(::java::lang::Throwable *);
|
||||
virtual ::java::lang::Throwable * getException();
|
||||
virtual ::java::lang::Throwable * getCause();
|
||||
public: // actually package-private
|
||||
static const jlong serialVersionUID = 1521711792217232256LL;
|
||||
private:
|
||||
::java::lang::Throwable * __attribute__((aligned(__alignof__( ::java::lang::LinkageError)))) exception;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ExceptionInInitializerError__
|
||||
@@ -0,0 +1,58 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Float__
|
||||
#define __java_lang_Float__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Number.h>
|
||||
|
||||
class java::lang::Float : public ::java::lang::Number
|
||||
{
|
||||
|
||||
public:
|
||||
Float(jfloat);
|
||||
Float(jdouble);
|
||||
Float(::java::lang::String *);
|
||||
static ::java::lang::String * toString(jfloat);
|
||||
static ::java::lang::String * toHexString(jfloat);
|
||||
static ::java::lang::Float * valueOf(::java::lang::String *);
|
||||
static ::java::lang::Float * valueOf(jfloat);
|
||||
static jfloat parseFloat(::java::lang::String *);
|
||||
static jboolean isNaN(jfloat);
|
||||
static jboolean isInfinite(jfloat);
|
||||
jboolean isNaN();
|
||||
jboolean isInfinite();
|
||||
::java::lang::String * toString();
|
||||
jbyte byteValue();
|
||||
jshort shortValue();
|
||||
jint intValue();
|
||||
jlong longValue();
|
||||
jfloat floatValue();
|
||||
jdouble doubleValue();
|
||||
jint hashCode();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
static jint floatToIntBits(jfloat);
|
||||
static jint floatToRawIntBits(jfloat);
|
||||
static jfloat intBitsToFloat(jint);
|
||||
jint target$compareTo(::java::lang::Float *);
|
||||
static jint compare(jfloat, jfloat);
|
||||
jint compareTo(::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -2671257302660747028LL;
|
||||
public:
|
||||
static jfloat MAX_VALUE;
|
||||
static jfloat MIN_VALUE;
|
||||
static jfloat NEGATIVE_INFINITY;
|
||||
static jfloat POSITIVE_INFINITY;
|
||||
static jfloat NaN;
|
||||
static ::java::lang::Class * TYPE;
|
||||
static const jint SIZE = 32;
|
||||
private:
|
||||
jfloat __attribute__((aligned(__alignof__( ::java::lang::Number)))) value;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Float__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_IllegalAccessError__
|
||||
#define __java_lang_IllegalAccessError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IncompatibleClassChangeError.h>
|
||||
|
||||
class java::lang::IllegalAccessError : public ::java::lang::IncompatibleClassChangeError
|
||||
{
|
||||
|
||||
public:
|
||||
IllegalAccessError();
|
||||
IllegalAccessError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -8988904074992417891LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_IllegalAccessError__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_IllegalAccessException__
|
||||
#define __java_lang_IllegalAccessException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Exception.h>
|
||||
|
||||
class java::lang::IllegalAccessException : public ::java::lang::Exception
|
||||
{
|
||||
|
||||
public:
|
||||
IllegalAccessException();
|
||||
IllegalAccessException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 6616958222490762034LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_IllegalAccessException__
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_IllegalArgumentException__
|
||||
#define __java_lang_IllegalArgumentException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::IllegalArgumentException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
IllegalArgumentException();
|
||||
IllegalArgumentException(::java::lang::String *);
|
||||
IllegalArgumentException(::java::lang::String *, ::java::lang::Throwable *);
|
||||
IllegalArgumentException(::java::lang::Throwable *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -5365630128856068164LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_IllegalArgumentException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_IllegalMonitorStateException__
|
||||
#define __java_lang_IllegalMonitorStateException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::IllegalMonitorStateException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
IllegalMonitorStateException();
|
||||
IllegalMonitorStateException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 3713306369498869069LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_IllegalMonitorStateException__
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_IllegalStateException__
|
||||
#define __java_lang_IllegalStateException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::IllegalStateException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
IllegalStateException();
|
||||
IllegalStateException(::java::lang::String *);
|
||||
IllegalStateException(::java::lang::String *, ::java::lang::Throwable *);
|
||||
IllegalStateException(::java::lang::Throwable *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -1848914673093119416LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_IllegalStateException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_IllegalThreadStateException__
|
||||
#define __java_lang_IllegalThreadStateException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IllegalArgumentException.h>
|
||||
|
||||
class java::lang::IllegalThreadStateException : public ::java::lang::IllegalArgumentException
|
||||
{
|
||||
|
||||
public:
|
||||
IllegalThreadStateException();
|
||||
IllegalThreadStateException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -7626246362397460174LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_IllegalThreadStateException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_IncompatibleClassChangeError__
|
||||
#define __java_lang_IncompatibleClassChangeError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/LinkageError.h>
|
||||
|
||||
class java::lang::IncompatibleClassChangeError : public ::java::lang::LinkageError
|
||||
{
|
||||
|
||||
public:
|
||||
IncompatibleClassChangeError();
|
||||
IncompatibleClassChangeError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -4914975503642802119LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_IncompatibleClassChangeError__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_IndexOutOfBoundsException__
|
||||
#define __java_lang_IndexOutOfBoundsException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::IndexOutOfBoundsException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
IndexOutOfBoundsException();
|
||||
IndexOutOfBoundsException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 234122996006267687LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_IndexOutOfBoundsException__
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_InheritableThreadLocal__
|
||||
#define __java_lang_InheritableThreadLocal__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/ThreadLocal.h>
|
||||
|
||||
class java::lang::InheritableThreadLocal : public ::java::lang::ThreadLocal
|
||||
{
|
||||
|
||||
public:
|
||||
InheritableThreadLocal();
|
||||
public: // actually protected
|
||||
virtual ::java::lang::Object * childValue(::java::lang::Object *);
|
||||
public: // actually package-private
|
||||
static void newChildThread(::java::lang::Thread *);
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_InheritableThreadLocal__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_InstantiationError__
|
||||
#define __java_lang_InstantiationError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IncompatibleClassChangeError.h>
|
||||
|
||||
class java::lang::InstantiationError : public ::java::lang::IncompatibleClassChangeError
|
||||
{
|
||||
|
||||
public:
|
||||
InstantiationError();
|
||||
InstantiationError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -4885810657349421204LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_InstantiationError__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_InstantiationException__
|
||||
#define __java_lang_InstantiationException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Exception.h>
|
||||
|
||||
class java::lang::InstantiationException : public ::java::lang::Exception
|
||||
{
|
||||
|
||||
public:
|
||||
InstantiationException();
|
||||
InstantiationException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -8441929162975509110LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_InstantiationException__
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Integer__
|
||||
#define __java_lang_Integer__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Number.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::Integer : public ::java::lang::Number
|
||||
{
|
||||
|
||||
public:
|
||||
Integer(jint);
|
||||
Integer(::java::lang::String *);
|
||||
static ::java::lang::String * toString(jint, jint);
|
||||
static ::java::lang::String * toHexString(jint);
|
||||
static ::java::lang::String * toOctalString(jint);
|
||||
static ::java::lang::String * toBinaryString(jint);
|
||||
static ::java::lang::String * toString(jint);
|
||||
static jint parseInt(::java::lang::String *, jint);
|
||||
static jint parseInt(::java::lang::String *);
|
||||
static ::java::lang::Integer * valueOf(::java::lang::String *, jint);
|
||||
static ::java::lang::Integer * valueOf(::java::lang::String *);
|
||||
static ::java::lang::Integer * valueOf(jint);
|
||||
jbyte byteValue();
|
||||
jshort shortValue();
|
||||
jint intValue();
|
||||
jlong longValue();
|
||||
jfloat floatValue();
|
||||
jdouble doubleValue();
|
||||
::java::lang::String * toString();
|
||||
jint hashCode();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
static ::java::lang::Integer * getInteger(::java::lang::String *);
|
||||
static ::java::lang::Integer * getInteger(::java::lang::String *, jint);
|
||||
static ::java::lang::Integer * getInteger(::java::lang::String *, ::java::lang::Integer *);
|
||||
static ::java::lang::Integer * decode(::java::lang::String *);
|
||||
jint target$compareTo(::java::lang::Integer *);
|
||||
static jint bitCount(jint);
|
||||
static jint rotateLeft(jint, jint);
|
||||
static jint rotateRight(jint, jint);
|
||||
static jint highestOneBit(jint);
|
||||
static jint numberOfLeadingZeros(jint);
|
||||
static jint lowestOneBit(jint);
|
||||
static jint numberOfTrailingZeros(jint);
|
||||
static jint signum(jint);
|
||||
static jint reverseBytes(jint);
|
||||
static jint reverse(jint);
|
||||
public: // actually package-private
|
||||
static ::java::lang::String * toUnsignedString(jint, jint);
|
||||
static jint parseInt(::java::lang::String *, jint, jboolean);
|
||||
public:
|
||||
jint compareTo(::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 1360826667806852920LL;
|
||||
public:
|
||||
static const jint MIN_VALUE = -2147483647 - 1;
|
||||
static const jint MAX_VALUE = 2147483647;
|
||||
static ::java::lang::Class * TYPE;
|
||||
static const jint SIZE = 32;
|
||||
private:
|
||||
static const jint MIN_CACHE = -128;
|
||||
static const jint MAX_CACHE = 127;
|
||||
static JArray< ::java::lang::Integer * > * intCache;
|
||||
jint __attribute__((aligned(__alignof__( ::java::lang::Number)))) value;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Integer__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_InternalError__
|
||||
#define __java_lang_InternalError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/VirtualMachineError.h>
|
||||
|
||||
class java::lang::InternalError : public ::java::lang::VirtualMachineError
|
||||
{
|
||||
|
||||
public:
|
||||
InternalError();
|
||||
InternalError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -9062593416125562365LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_InternalError__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_InterruptedException__
|
||||
#define __java_lang_InterruptedException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Exception.h>
|
||||
|
||||
class java::lang::InterruptedException : public ::java::lang::Exception
|
||||
{
|
||||
|
||||
public:
|
||||
InterruptedException();
|
||||
InterruptedException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 6700697376100628473LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_InterruptedException__
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Iterable__
|
||||
#define __java_lang_Iterable__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Iterable : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ::java::util::Iterator * iterator() = 0;
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_Iterable__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_LinkageError__
|
||||
#define __java_lang_LinkageError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Error.h>
|
||||
|
||||
class java::lang::LinkageError : public ::java::lang::Error
|
||||
{
|
||||
|
||||
public:
|
||||
LinkageError();
|
||||
LinkageError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 3579600108157160122LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_LinkageError__
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Long__
|
||||
#define __java_lang_Long__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Number.h>
|
||||
|
||||
class java::lang::Long : public ::java::lang::Number
|
||||
{
|
||||
|
||||
public:
|
||||
Long(jlong);
|
||||
Long(::java::lang::String *);
|
||||
static ::java::lang::String * toString(jlong, jint);
|
||||
static ::java::lang::String * toHexString(jlong);
|
||||
static ::java::lang::String * toOctalString(jlong);
|
||||
static ::java::lang::String * toBinaryString(jlong);
|
||||
static ::java::lang::String * toString(jlong);
|
||||
static jlong parseLong(::java::lang::String *, jint);
|
||||
static jlong parseLong(::java::lang::String *);
|
||||
static ::java::lang::Long * valueOf(::java::lang::String *, jint);
|
||||
static ::java::lang::Long * valueOf(::java::lang::String *);
|
||||
static ::java::lang::Long * valueOf(jlong);
|
||||
static ::java::lang::Long * decode(::java::lang::String *);
|
||||
jbyte byteValue();
|
||||
jshort shortValue();
|
||||
jint intValue();
|
||||
jlong longValue();
|
||||
jfloat floatValue();
|
||||
jdouble doubleValue();
|
||||
::java::lang::String * toString();
|
||||
jint hashCode();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
static ::java::lang::Long * getLong(::java::lang::String *);
|
||||
static ::java::lang::Long * getLong(::java::lang::String *, jlong);
|
||||
static ::java::lang::Long * getLong(::java::lang::String *, ::java::lang::Long *);
|
||||
jint target$compareTo(::java::lang::Long *);
|
||||
static jint bitCount(jlong);
|
||||
static jlong rotateLeft(jlong, jint);
|
||||
static jlong rotateRight(jlong, jint);
|
||||
static jlong highestOneBit(jlong);
|
||||
static jint numberOfLeadingZeros(jlong);
|
||||
static jlong lowestOneBit(jlong);
|
||||
static jint numberOfTrailingZeros(jlong);
|
||||
static jint signum(jlong);
|
||||
static jlong reverseBytes(jlong);
|
||||
static jlong reverse(jlong);
|
||||
private:
|
||||
static ::java::lang::String * toUnsignedString(jlong, jint);
|
||||
static jlong parseLong(::java::lang::String *, jint, jboolean);
|
||||
public:
|
||||
jint compareTo(::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 4290774380558885855LL;
|
||||
public:
|
||||
static const jlong MIN_VALUE = -9223372036854775807LL - 1;
|
||||
static const jlong MAX_VALUE = 9223372036854775807LL;
|
||||
static ::java::lang::Class * TYPE;
|
||||
static const jint SIZE = 64;
|
||||
private:
|
||||
jlong __attribute__((aligned(__alignof__( ::java::lang::Number)))) value;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Long__
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Math__
|
||||
#define __java_lang_Math__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Math : public ::java::lang::Object
|
||||
{
|
||||
|
||||
Math();
|
||||
public:
|
||||
static jint abs(jint);
|
||||
static jlong abs(jlong);
|
||||
static jfloat abs(jfloat);
|
||||
static jdouble abs(jdouble);
|
||||
static jint min(jint, jint);
|
||||
static jlong min(jlong, jlong);
|
||||
static jfloat min(jfloat, jfloat);
|
||||
static jdouble min(jdouble, jdouble);
|
||||
static jint max(jint, jint);
|
||||
static jlong max(jlong, jlong);
|
||||
static jfloat max(jfloat, jfloat);
|
||||
static jdouble max(jdouble, jdouble);
|
||||
static jdouble sin(jdouble);
|
||||
static jdouble cos(jdouble);
|
||||
static jdouble tan(jdouble);
|
||||
static jdouble asin(jdouble);
|
||||
static jdouble acos(jdouble);
|
||||
static jdouble atan(jdouble);
|
||||
static jdouble atan2(jdouble, jdouble);
|
||||
static jdouble exp(jdouble);
|
||||
static jdouble log(jdouble);
|
||||
static jdouble sqrt(jdouble);
|
||||
static jdouble pow(jdouble, jdouble);
|
||||
static jdouble IEEEremainder(jdouble, jdouble);
|
||||
static jdouble ceil(jdouble);
|
||||
static jdouble floor(jdouble);
|
||||
static jdouble rint(jdouble);
|
||||
static jint round(jfloat);
|
||||
static jlong round(jdouble);
|
||||
static jdouble random();
|
||||
static jdouble toRadians(jdouble);
|
||||
static jdouble toDegrees(jdouble);
|
||||
static jdouble cbrt(jdouble);
|
||||
static jdouble cosh(jdouble);
|
||||
static jdouble expm1(jdouble);
|
||||
static jdouble hypot(jdouble, jdouble);
|
||||
static jdouble log10(jdouble);
|
||||
static jdouble log1p(jdouble);
|
||||
static jdouble signum(jdouble);
|
||||
static jfloat signum(jfloat);
|
||||
static jdouble sinh(jdouble);
|
||||
static jdouble tanh(jdouble);
|
||||
static jdouble ulp(jdouble);
|
||||
static jfloat ulp(jfloat);
|
||||
private:
|
||||
static ::java::util::Random * rand;
|
||||
public:
|
||||
static jdouble E;
|
||||
static jdouble PI;
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Math__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_NegativeArraySizeException__
|
||||
#define __java_lang_NegativeArraySizeException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::NegativeArraySizeException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
NegativeArraySizeException();
|
||||
NegativeArraySizeException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -8960118058596991861LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_NegativeArraySizeException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_NoClassDefFoundError__
|
||||
#define __java_lang_NoClassDefFoundError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/LinkageError.h>
|
||||
|
||||
class java::lang::NoClassDefFoundError : public ::java::lang::LinkageError
|
||||
{
|
||||
|
||||
public:
|
||||
NoClassDefFoundError();
|
||||
NoClassDefFoundError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 9095859863287012458LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_NoClassDefFoundError__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_NoSuchFieldError__
|
||||
#define __java_lang_NoSuchFieldError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IncompatibleClassChangeError.h>
|
||||
|
||||
class java::lang::NoSuchFieldError : public ::java::lang::IncompatibleClassChangeError
|
||||
{
|
||||
|
||||
public:
|
||||
NoSuchFieldError();
|
||||
NoSuchFieldError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -3456430195886129035LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_NoSuchFieldError__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_NoSuchFieldException__
|
||||
#define __java_lang_NoSuchFieldException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Exception.h>
|
||||
|
||||
class java::lang::NoSuchFieldException : public ::java::lang::Exception
|
||||
{
|
||||
|
||||
public:
|
||||
NoSuchFieldException();
|
||||
NoSuchFieldException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -6143714805279938260LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_NoSuchFieldException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_NoSuchMethodError__
|
||||
#define __java_lang_NoSuchMethodError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IncompatibleClassChangeError.h>
|
||||
|
||||
class java::lang::NoSuchMethodError : public ::java::lang::IncompatibleClassChangeError
|
||||
{
|
||||
|
||||
public:
|
||||
NoSuchMethodError();
|
||||
NoSuchMethodError(::java::lang::String *);
|
||||
public: // actually package-private
|
||||
static const jlong serialVersionUID = -3765521442372831335LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_NoSuchMethodError__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_NoSuchMethodException__
|
||||
#define __java_lang_NoSuchMethodException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Exception.h>
|
||||
|
||||
class java::lang::NoSuchMethodException : public ::java::lang::Exception
|
||||
{
|
||||
|
||||
public:
|
||||
NoSuchMethodException();
|
||||
NoSuchMethodException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 5034388446362600923LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_NoSuchMethodException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_NullPointerException__
|
||||
#define __java_lang_NullPointerException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::NullPointerException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
NullPointerException();
|
||||
NullPointerException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 5162710183389028792LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_NullPointerException__
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Number__
|
||||
#define __java_lang_Number__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::Number : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
Number();
|
||||
virtual jint intValue() = 0;
|
||||
virtual jlong longValue() = 0;
|
||||
virtual jfloat floatValue() = 0;
|
||||
virtual jdouble doubleValue() = 0;
|
||||
virtual jbyte byteValue();
|
||||
virtual jshort shortValue();
|
||||
private:
|
||||
static const jlong serialVersionUID = -8742448824652078965LL;
|
||||
public: // actually package-private
|
||||
static JArray< jchar > * digits;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Number__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_NumberFormatException__
|
||||
#define __java_lang_NumberFormatException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IllegalArgumentException.h>
|
||||
|
||||
class java::lang::NumberFormatException : public ::java::lang::IllegalArgumentException
|
||||
{
|
||||
|
||||
public:
|
||||
NumberFormatException();
|
||||
NumberFormatException(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -2848938806368998894LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_NumberFormatException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_OutOfMemoryError__
|
||||
#define __java_lang_OutOfMemoryError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/VirtualMachineError.h>
|
||||
|
||||
class java::lang::OutOfMemoryError : public ::java::lang::VirtualMachineError
|
||||
{
|
||||
|
||||
public:
|
||||
OutOfMemoryError();
|
||||
OutOfMemoryError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 8228564086184010517LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_OutOfMemoryError__
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Override__
|
||||
#define __java_lang_Override__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Override : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ::java::lang::Class * annotationType() = 0;
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_Override__
|
||||
@@ -0,0 +1,62 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Package__
|
||||
#define __java_lang_Package__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
extern "Java"
|
||||
{
|
||||
namespace java
|
||||
{
|
||||
namespace net
|
||||
{
|
||||
class URL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class java::lang::Package : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public: // actually package-private
|
||||
Package(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::net::URL *);
|
||||
Package(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::net::URL *, ::java::lang::ClassLoader *);
|
||||
public:
|
||||
virtual ::java::lang::String * getName();
|
||||
virtual ::java::lang::String * getSpecificationTitle();
|
||||
virtual ::java::lang::String * getSpecificationVersion();
|
||||
virtual ::java::lang::String * getSpecificationVendor();
|
||||
virtual ::java::lang::String * getImplementationTitle();
|
||||
virtual ::java::lang::String * getImplementationVersion();
|
||||
virtual ::java::lang::String * getImplementationVendor();
|
||||
virtual jboolean isSealed();
|
||||
virtual jboolean isSealed(::java::net::URL *);
|
||||
virtual jboolean isCompatibleWith(::java::lang::String *);
|
||||
static ::java::lang::Package * getPackage(::java::lang::String *);
|
||||
static JArray< ::java::lang::Package * > * getPackages();
|
||||
virtual jint hashCode();
|
||||
virtual ::java::lang::String * toString();
|
||||
virtual ::java::lang::annotation::Annotation * getAnnotation(::java::lang::Class *);
|
||||
virtual JArray< ::java::lang::annotation::Annotation * > * getAnnotations();
|
||||
virtual JArray< ::java::lang::annotation::Annotation * > * getDeclaredAnnotations();
|
||||
virtual jboolean isAnnotationPresent(::java::lang::Class *);
|
||||
private:
|
||||
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) name;
|
||||
::java::lang::String * implTitle;
|
||||
::java::lang::String * implVendor;
|
||||
::java::lang::String * implVersion;
|
||||
::java::lang::String * specTitle;
|
||||
::java::lang::String * specVendor;
|
||||
::java::lang::String * specVersion;
|
||||
::java::net::URL * sealed;
|
||||
::java::lang::ClassLoader * loader;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Package__
|
||||
@@ -1,415 +0,0 @@
|
||||
/* Package.java -- information about a package
|
||||
Copyright (C) 2000, 2001, 2002, 2003, 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.lang;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
import java.net.URL;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
|
||||
/**
|
||||
* Everything you ever wanted to know about a package. This class makes it
|
||||
* possible to attach specification and implementation information to a
|
||||
* package as explained in the
|
||||
* <a href="http://java.sun.com/products/jdk/1.3/docs/guide/versioning/spec/VersioningSpecification.html#PackageVersionSpecification">Package Versioning Specification</a>
|
||||
* section of the
|
||||
* <a href="http://java.sun.com/products/jdk/1.3/docs/guide/versioning/spec/VersioningSpecification.html">Product Versioning Specification</a>.
|
||||
* It also allows packages to be sealed with respect to the originating URL.
|
||||
*
|
||||
* <p>The most useful method is the <code>isCompatibleWith()</code> method that
|
||||
* compares a desired version of a specification with the version of the
|
||||
* specification as implemented by a package. A package is considered
|
||||
* compatible with another version if the version of the specification is
|
||||
* equal or higher then the requested version. Version numbers are represented
|
||||
* as strings of positive numbers separated by dots (e.g. "1.2.0").
|
||||
* The first number is called the major number, the second the minor,
|
||||
* the third the micro, etc. A version is considered higher then another
|
||||
* version if it has a bigger major number then the another version or when
|
||||
* the major numbers of the versions are equal if it has a bigger minor number
|
||||
* then the other version, etc. (If a version has no minor, micro, etc numbers
|
||||
* then they are considered the be 0.)
|
||||
*
|
||||
* @author Mark Wielaard (mark@klomp.org)
|
||||
* @see ClassLoader#definePackage(String, String, String, String, String,
|
||||
* String, String, URL)
|
||||
* @since 1.2
|
||||
* @status updated to 1.5
|
||||
*/
|
||||
public class Package
|
||||
implements AnnotatedElement
|
||||
{
|
||||
/** The name of the Package */
|
||||
private final String name;
|
||||
|
||||
/** The name if the implementation */
|
||||
private final String implTitle;
|
||||
|
||||
/** The vendor that wrote this implementation */
|
||||
private final String implVendor;
|
||||
|
||||
/** The version of this implementation */
|
||||
private final String implVersion;
|
||||
|
||||
/** The name of the specification */
|
||||
private final String specTitle;
|
||||
|
||||
/** The name of the specification designer */
|
||||
private final String specVendor;
|
||||
|
||||
/** The version of this specification */
|
||||
private final String specVersion;
|
||||
|
||||
/** If sealed the origin of the package classes, otherwise null */
|
||||
private final URL sealed;
|
||||
|
||||
/** The class loader that defined this package */
|
||||
private ClassLoader loader;
|
||||
|
||||
/** @deprecated Please use the other constructor that takes the class loader
|
||||
* that defines the Package.
|
||||
*/
|
||||
Package(String name,
|
||||
String specTitle, String specVendor, String specVersion,
|
||||
String implTitle, String implVendor, String implVersion, URL sealed)
|
||||
{
|
||||
this(name, specTitle, specVendor, specVersion, implTitle, implVendor,
|
||||
implVersion, sealed, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* A package local constructor for the Package class. All parameters except
|
||||
* the <code>name</code> of the package may be <code>null</code>.
|
||||
* There are no public constructors defined for Package; this is a package
|
||||
* local constructor that is used by java.lang.Classloader.definePackage().
|
||||
*
|
||||
* @param name The name of the Package
|
||||
* @param specTitle The name of the specification
|
||||
* @param specVendor The name of the specification designer
|
||||
* @param specVersion The version of this specification
|
||||
* @param implTitle The name of the implementation
|
||||
* @param implVendor The vendor that wrote this implementation
|
||||
* @param implVersion The version of this implementation
|
||||
* @param sealed If sealed the origin of the package classes
|
||||
*/
|
||||
Package(String name,
|
||||
String specTitle, String specVendor, String specVersion,
|
||||
String implTitle, String implVendor, String implVersion, URL sealed,
|
||||
ClassLoader loader)
|
||||
{
|
||||
if (name == null)
|
||||
throw new IllegalArgumentException("null Package name");
|
||||
|
||||
this.name = name;
|
||||
this.implTitle = implTitle;
|
||||
this.implVendor = implVendor;
|
||||
this.implVersion = implVersion;
|
||||
this.specTitle = specTitle;
|
||||
this.specVendor = specVendor;
|
||||
this.specVersion = specVersion;
|
||||
this.sealed = sealed;
|
||||
this.loader = loader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Package name in dot-notation.
|
||||
*
|
||||
* @return the non-null package name
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the specification, or null if unknown.
|
||||
*
|
||||
* @return the specification title
|
||||
*/
|
||||
public String getSpecificationTitle()
|
||||
{
|
||||
return specTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of the specification, or null if unknown.
|
||||
*
|
||||
* @return the specification version
|
||||
*/
|
||||
public String getSpecificationVersion()
|
||||
{
|
||||
return specVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the specification designer, or null if unknown.
|
||||
*
|
||||
* @return the specification vendor
|
||||
*/
|
||||
public String getSpecificationVendor()
|
||||
{
|
||||
return specVendor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the implementation, or null if unknown.
|
||||
*
|
||||
* @return the implementation title
|
||||
*/
|
||||
public String getImplementationTitle()
|
||||
{
|
||||
return implTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of this implementation, or null if unknown.
|
||||
*
|
||||
* @return the implementation version
|
||||
*/
|
||||
public String getImplementationVersion()
|
||||
{
|
||||
return implVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the vendor that wrote this implementation, or null if unknown.
|
||||
*
|
||||
* @return the implementation vendor
|
||||
*/
|
||||
public String getImplementationVendor()
|
||||
{
|
||||
return implVendor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this Package is sealed.
|
||||
*
|
||||
* @return true if the package is sealed
|
||||
*/
|
||||
public boolean isSealed()
|
||||
{
|
||||
return sealed != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this Package is sealed and the origin of the classes is
|
||||
* the given URL.
|
||||
*
|
||||
* @param url the URL to test
|
||||
* @return true if the package is sealed by this URL
|
||||
* @throws NullPointerException if url is null
|
||||
*/
|
||||
public boolean isSealed(URL url)
|
||||
{
|
||||
return url.equals(sealed);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the version of the specification is higher or at least as high
|
||||
* as the desired version. Comparison is done by sequentially comparing
|
||||
* dotted decimal numbers from the parameter and from
|
||||
* <code>getSpecificationVersion</code>.
|
||||
*
|
||||
* @param version the (minimal) desired version of the specification
|
||||
*
|
||||
* @return true if the version is compatible, false otherwise
|
||||
*
|
||||
* @throws NumberFormatException if either version string is invalid
|
||||
* @throws NullPointerException if either version string is null
|
||||
*/
|
||||
public boolean isCompatibleWith(String version)
|
||||
{
|
||||
StringTokenizer versionTokens = new StringTokenizer(version, ".");
|
||||
StringTokenizer specTokens = new StringTokenizer(specVersion, ".");
|
||||
try
|
||||
{
|
||||
while (versionTokens.hasMoreElements())
|
||||
{
|
||||
int vers = Integer.parseInt(versionTokens.nextToken());
|
||||
int spec = Integer.parseInt(specTokens.nextToken());
|
||||
if (spec < vers)
|
||||
return false;
|
||||
else if (spec > vers)
|
||||
return true;
|
||||
// They must be equal, next Token please!
|
||||
}
|
||||
}
|
||||
catch (NoSuchElementException e)
|
||||
{
|
||||
// This must have been thrown by spec.nextToken() so return false.
|
||||
return false;
|
||||
}
|
||||
// They must have been exactly the same version.
|
||||
// Or the specVersion has more subversions. That is also good.
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the named package if it is known by the callers class loader.
|
||||
* It may return null if the package is unknown, when there is no
|
||||
* information on that particular package available or when the callers
|
||||
* classloader is null.
|
||||
*
|
||||
* @param name the name of the desired package
|
||||
* @return the package by that name in the current ClassLoader
|
||||
*/
|
||||
public static Package getPackage(String name)
|
||||
{
|
||||
// Get the caller's classloader
|
||||
ClassLoader cl = VMSecurityManager.currentClassLoader(Package.class);
|
||||
return cl != null ? cl.getPackage(name) : VMClassLoader.getPackage(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the packages that are known to the callers class loader.
|
||||
* It may return an empty array if the classloader of the caller is null.
|
||||
*
|
||||
* @return an array of all known packages
|
||||
*/
|
||||
public static Package[] getPackages()
|
||||
{
|
||||
// Get the caller's classloader
|
||||
Class c = VMSecurityManager.getClassContext(Package.class)[1];
|
||||
ClassLoader cl = c.getClassLoader();
|
||||
return cl != null ? cl.getPackages() : VMClassLoader.getPackages();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the hashCode of the name of this package.
|
||||
*
|
||||
* @return the hash code
|
||||
*/
|
||||
public int hashCode()
|
||||
{
|
||||
return name.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this package. It is specified to
|
||||
* be <code>"package " + getName() + (getSpecificationTitle() == null
|
||||
* ? "" : ", " + getSpecificationTitle()) + (getSpecificationVersion()
|
||||
* == null ? "" : ", version " + getSpecificationVersion())</code>.
|
||||
*
|
||||
* @return the string representation of the package
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
return ("package " + name + (specTitle == null ? "" : ", " + specTitle)
|
||||
+ (specVersion == null ? "" : ", version " + specVersion));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this package's annotation for the specified annotation type,
|
||||
* or <code>null</code> if no such annotation exists.
|
||||
*
|
||||
* @param annotationClass the type of annotation to look for.
|
||||
* @return this package's annotation for the specified type, or
|
||||
* <code>null</code> if no such annotation exists.
|
||||
* @since 1.5
|
||||
*/
|
||||
/* FIXME[GENERICS]: <T extends Annotation> T getAnnotation(Class <T>) */
|
||||
public Annotation getAnnotation(Class annotationClass)
|
||||
{
|
||||
Annotation foundAnnotation = null;
|
||||
Annotation[] annotations = getAnnotations();
|
||||
for (int i = 0; i < annotations.length; i++)
|
||||
if (annotations[i].annotationType() == annotationClass)
|
||||
foundAnnotation = annotations[i];
|
||||
return foundAnnotation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all annotations associated with this package. If there are
|
||||
* no annotations associated with this package, then a zero-length array
|
||||
* will be returned. The returned array may be modified by the client
|
||||
* code, but this will have no effect on the annotation content of this
|
||||
* package, and hence no effect on the return value of this method for
|
||||
* future callers.
|
||||
*
|
||||
* @return this package' annotations.
|
||||
* @since 1.5
|
||||
*/
|
||||
public Annotation[] getAnnotations()
|
||||
{
|
||||
/** All a package's annotations are declared within it. */
|
||||
return getDeclaredAnnotations();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all annotations directly defined by this package. If there are
|
||||
* no annotations associated with this package, then a zero-length array
|
||||
* will be returned. The returned array may be modified by the client
|
||||
* code, but this will have no effect on the annotation content of this
|
||||
* package, and hence no effect on the return value of this method for
|
||||
* future callers.
|
||||
*
|
||||
* @return the annotations directly defined by this package.
|
||||
* @since 1.5
|
||||
*/
|
||||
public Annotation[] getDeclaredAnnotations()
|
||||
{
|
||||
try
|
||||
{
|
||||
Class pkgInfo = Class.forName(name + ".package-info", false, loader);
|
||||
return pkgInfo.getDeclaredAnnotations();
|
||||
}
|
||||
catch (ClassNotFoundException _)
|
||||
{
|
||||
return new Annotation[0];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if an annotation for the specified type is associated
|
||||
* with this package. This is primarily a short-hand for using marker
|
||||
* annotations.
|
||||
*
|
||||
* @param annotationClass the type of annotation to look for.
|
||||
* @return true if an annotation exists for the specified type.
|
||||
* @since 1.5
|
||||
*/
|
||||
/* FIXME[GENERICS]: Signature is Class<? extends Annotation> */
|
||||
public boolean isAnnotationPresent(Class
|
||||
annotationClass)
|
||||
{
|
||||
return getAnnotation(annotationClass) != null;
|
||||
}
|
||||
|
||||
} // class Package
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_PosixProcess$EOFInputStream__
|
||||
#define __java_lang_PosixProcess$EOFInputStream__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/io/InputStream.h>
|
||||
|
||||
class java::lang::PosixProcess$EOFInputStream : public ::java::io::InputStream
|
||||
{
|
||||
|
||||
public: // actually package-private
|
||||
PosixProcess$EOFInputStream();
|
||||
public:
|
||||
virtual jint read();
|
||||
public: // actually package-private
|
||||
static ::java::lang::PosixProcess$EOFInputStream * instance;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_PosixProcess$EOFInputStream__
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_PosixProcess$ProcessManager__
|
||||
#define __java_lang_PosixProcess$ProcessManager__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Thread.h>
|
||||
|
||||
class java::lang::PosixProcess$ProcessManager : public ::java::lang::Thread
|
||||
{
|
||||
|
||||
public: // actually package-private
|
||||
PosixProcess$ProcessManager();
|
||||
private:
|
||||
::java::lang::PosixProcess * removeProcessFromMap(jlong);
|
||||
public: // actually package-private
|
||||
virtual void addProcessToMap(::java::lang::PosixProcess *);
|
||||
virtual void startExecuting(::java::lang::PosixProcess *);
|
||||
virtual void waitUntilReady();
|
||||
public:
|
||||
virtual void run();
|
||||
private:
|
||||
void init();
|
||||
void waitForSignal();
|
||||
jboolean reap();
|
||||
void signalReaper();
|
||||
public: // actually package-private
|
||||
::java::util::List * __attribute__((aligned(__alignof__( ::java::lang::Thread)))) queue;
|
||||
private:
|
||||
::java::util::Map * pidToProcess;
|
||||
jboolean ready;
|
||||
jlong reaperPID;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_PosixProcess$ProcessManager__
|
||||
@@ -0,0 +1,62 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_PosixProcess__
|
||||
#define __java_lang_PosixProcess__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Process.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::PosixProcess : public ::java::lang::Process
|
||||
{
|
||||
|
||||
public:
|
||||
void destroy();
|
||||
private:
|
||||
void nativeDestroy();
|
||||
public:
|
||||
jint exitValue();
|
||||
public: // actually package-private
|
||||
void processTerminationCleanup();
|
||||
public:
|
||||
::java::io::InputStream * getErrorStream();
|
||||
::java::io::InputStream * getInputStream();
|
||||
::java::io::OutputStream * getOutputStream();
|
||||
jint waitFor();
|
||||
public: // actually package-private
|
||||
void spawn(::java::lang::PosixProcess$ProcessManager *);
|
||||
private:
|
||||
void nativeSpawn();
|
||||
public: // actually package-private
|
||||
PosixProcess(JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, ::java::io::File *);
|
||||
static jlong access$0(::java::lang::PosixProcess *);
|
||||
static ::java::lang::Object * access$1();
|
||||
static void access$2(::java::lang::PosixProcess$ProcessManager *);
|
||||
private:
|
||||
JArray< ::java::lang::String * > * __attribute__((aligned(__alignof__( ::java::lang::Process)))) progarray;
|
||||
JArray< ::java::lang::String * > * envp;
|
||||
::java::io::File * dir;
|
||||
::java::lang::Throwable * exception;
|
||||
jlong pid;
|
||||
public: // actually package-private
|
||||
static const jint STATE_WAITING_TO_START = 0;
|
||||
static const jint STATE_RUNNING = 1;
|
||||
static const jint STATE_TERMINATED = 2;
|
||||
jint state;
|
||||
jint status;
|
||||
private:
|
||||
::java::io::InputStream * errorStream;
|
||||
::java::io::InputStream * inputStream;
|
||||
::java::io::OutputStream * outputStream;
|
||||
::java::io::InputStream * returnedErrorStream;
|
||||
::java::io::InputStream * returnedInputStream;
|
||||
static ::java::lang::Object * queueLock;
|
||||
static ::java::lang::PosixProcess$ProcessManager * processManager;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_PosixProcess__
|
||||
@@ -1,5 +1,5 @@
|
||||
// PosixProcess.java - Subclass of Process for POSIX systems.
|
||||
/* Copyright (C) 1998, 1999, 2004 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2004, 2006 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
@@ -25,19 +25,15 @@ import java.util.Map;
|
||||
* @author David Daney <ddaney@avtrex.com> Rewrote using
|
||||
* ProcessManager
|
||||
*/
|
||||
|
||||
// This is entirely internal to our implementation.
|
||||
// This file is copied to `ConcreteProcess.java' before compilation.
|
||||
// Hence the class name apparently does not match the file name.
|
||||
final class ConcreteProcess extends Process
|
||||
final class PosixProcess extends Process
|
||||
{
|
||||
static class ProcessManager extends Thread
|
||||
{
|
||||
/**
|
||||
* A list of {@link ConcreteProcess ConcreteProcesses} to be
|
||||
* A list of {@link PosixProcess PosixProcesses} to be
|
||||
* started. The queueLock object is used as the lock Object
|
||||
* for all process related operations. To avoid dead lock
|
||||
* ensure queueLock is obtained before ConcreteProcess.
|
||||
* ensure queueLock is obtained before PosixProcess.
|
||||
*/
|
||||
List queue = new LinkedList();
|
||||
private Map pidToProcess = new HashMap();
|
||||
@@ -52,37 +48,37 @@ final class ConcreteProcess extends Process
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ConcreteProcess object with the given pid and
|
||||
* Get the PosixProcess object with the given pid and
|
||||
* remove it from the map. This method is called from the
|
||||
* native code for {@link #reap()). The mapping is removed so
|
||||
* the ConcreteProcesses can be GCed after they terminate.
|
||||
* the PosixProcesses can be GCed after they terminate.
|
||||
*
|
||||
* @param p The pid of the process.
|
||||
*/
|
||||
private ConcreteProcess removeProcessFromMap(long p)
|
||||
private PosixProcess removeProcessFromMap(long p)
|
||||
{
|
||||
return (ConcreteProcess) pidToProcess.remove(new Long(p));
|
||||
return (PosixProcess) pidToProcess.remove(new Long(p));
|
||||
}
|
||||
|
||||
/**
|
||||
* Put the given ConcreteProcess in the map using the Long
|
||||
* Put the given PosixProcess in the map using the Long
|
||||
* value of its pid as the key.
|
||||
*
|
||||
* @param p The ConcreteProcess.
|
||||
* @param p The PosixProcess.
|
||||
*/
|
||||
void addProcessToMap(ConcreteProcess p)
|
||||
void addProcessToMap(PosixProcess p)
|
||||
{
|
||||
pidToProcess.put(new Long(p.pid), p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Queue up the ConcreteProcess and awake the ProcessManager.
|
||||
* The ProcessManager will start the ConcreteProcess from its
|
||||
* Queue up the PosixProcess and awake the ProcessManager.
|
||||
* The ProcessManager will start the PosixProcess from its
|
||||
* thread so it can be reaped when it terminates.
|
||||
*
|
||||
* @param p The ConcreteProcess.
|
||||
* @param p The PosixProcess.
|
||||
*/
|
||||
void startExecuting(ConcreteProcess p)
|
||||
void startExecuting(PosixProcess p)
|
||||
{
|
||||
synchronized (queueLock)
|
||||
{
|
||||
@@ -154,7 +150,7 @@ final class ConcreteProcess extends Process
|
||||
}
|
||||
while (queue.size() > 0)
|
||||
{
|
||||
ConcreteProcess p = (ConcreteProcess) queue.remove(0);
|
||||
PosixProcess p = (PosixProcess) queue.remove(0);
|
||||
p.spawn(this);
|
||||
}
|
||||
}
|
||||
@@ -353,10 +349,7 @@ final class ConcreteProcess extends Process
|
||||
*/
|
||||
private native void nativeSpawn();
|
||||
|
||||
// This file is copied to `ConcreteProcess.java' before
|
||||
// compilation. Hence the constructor name apparently does not
|
||||
// match the file name.
|
||||
ConcreteProcess(String[] progarray, String[] envp, File dir)
|
||||
PosixProcess(String[] progarray, String[] envp, File dir)
|
||||
throws IOException
|
||||
{
|
||||
// Check to ensure there is something to run, and avoid
|
||||
@@ -378,7 +371,7 @@ final class ConcreteProcess extends Process
|
||||
processManager.waitUntilReady();
|
||||
}
|
||||
|
||||
// Queue this ConcreteProcess for starting by the ProcessManager.
|
||||
// Queue this PosixProcess for starting by the ProcessManager.
|
||||
processManager.startExecuting(this);
|
||||
}
|
||||
|
||||
@@ -428,8 +421,8 @@ final class ConcreteProcess extends Process
|
||||
/** The process id. This is cast to a pid_t on the native side. */
|
||||
private long pid;
|
||||
|
||||
// FIXME: Why doesn't the friend declaration in ConcreteProcess.h
|
||||
// allow ConcreteProcess$ProcessManager native code access these
|
||||
// FIXME: Why doesn't the friend declaration in PosixProcess.h
|
||||
// allow PosixProcess$ProcessManager native code access these
|
||||
// when they are private?
|
||||
|
||||
/** Before the process is forked. */
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Process__
|
||||
#define __java_lang_Process__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Process : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
Process();
|
||||
virtual ::java::io::OutputStream * getOutputStream() = 0;
|
||||
virtual ::java::io::InputStream * getInputStream() = 0;
|
||||
virtual ::java::io::InputStream * getErrorStream() = 0;
|
||||
virtual jint waitFor() = 0;
|
||||
virtual jint exitValue() = 0;
|
||||
virtual void destroy() = 0;
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Process__
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_ProcessBuilder__
|
||||
#define __java_lang_ProcessBuilder__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::ProcessBuilder : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
ProcessBuilder(::java::util::List *);
|
||||
ProcessBuilder(JArray< ::java::lang::String * > *);
|
||||
::java::util::List * command();
|
||||
::java::lang::ProcessBuilder * command(::java::util::List *);
|
||||
::java::lang::ProcessBuilder * command(JArray< ::java::lang::String * > *);
|
||||
::java::io::File * directory();
|
||||
::java::lang::ProcessBuilder * directory(::java::io::File *);
|
||||
::java::util::Map * environment();
|
||||
jboolean redirectErrorStream();
|
||||
::java::lang::ProcessBuilder * redirectErrorStream(jboolean);
|
||||
::java::lang::Process * start();
|
||||
private:
|
||||
::java::io::File * __attribute__((aligned(__alignof__( ::java::lang::Object)))) directory__;
|
||||
::java::util::List * command__;
|
||||
::java::util::Map * environment__;
|
||||
jboolean redirect;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_ProcessBuilder__
|
||||
@@ -0,0 +1,118 @@
|
||||
/* ProcessBuilder.java - Represent spawned system process
|
||||
Copyright (C) 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.lang;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public final class ProcessBuilder
|
||||
{
|
||||
private File directory = new File(System.getProperty("user.dir"));
|
||||
private List<String> command;
|
||||
// FIXME: make a copy.
|
||||
private Map<String, String> environment = System.getenv();
|
||||
private boolean redirect = false;
|
||||
|
||||
public ProcessBuilder(List<String> command)
|
||||
{
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
public ProcessBuilder(String... command)
|
||||
{
|
||||
this.command = Arrays.asList(command);
|
||||
}
|
||||
|
||||
public List<String> command()
|
||||
{
|
||||
return command;
|
||||
}
|
||||
|
||||
public ProcessBuilder command(List<String> command)
|
||||
{
|
||||
this.command = command;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ProcessBuilder command(String... command)
|
||||
{
|
||||
this.command = Arrays.asList(command);
|
||||
return this;
|
||||
}
|
||||
|
||||
public File directory()
|
||||
{
|
||||
return directory;
|
||||
}
|
||||
|
||||
public ProcessBuilder directory(File directory)
|
||||
{
|
||||
this.directory = directory;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map<String, String> environment()
|
||||
{
|
||||
return environment;
|
||||
}
|
||||
|
||||
public boolean redirectErrorStream()
|
||||
{
|
||||
return redirect;
|
||||
}
|
||||
|
||||
public ProcessBuilder redirectErrorStream(boolean redirect)
|
||||
{
|
||||
this.redirect = redirect;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Process start() throws IOException
|
||||
{
|
||||
SecurityManager sm = SecurityManager.current; // Be thread-safe!
|
||||
if (sm != null)
|
||||
sm.checkExec(command.get(0));
|
||||
// return VMProcess.exec(command, environment, directory, redirect);
|
||||
// FIXME
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Readable__
|
||||
#define __java_lang_Readable__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
extern "Java"
|
||||
{
|
||||
namespace java
|
||||
{
|
||||
namespace nio
|
||||
{
|
||||
class CharBuffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class java::lang::Readable : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
virtual jint read(::java::nio::CharBuffer *) = 0;
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_Readable__
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Runnable__
|
||||
#define __java_lang_Runnable__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::Runnable : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
virtual void run() = 0;
|
||||
static ::java::lang::Class class$;
|
||||
} __attribute__ ((java_interface));
|
||||
|
||||
#endif // __java_lang_Runnable__
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Runtime__
|
||||
#define __java_lang_Runtime__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::Runtime : public ::java::lang::Object
|
||||
{
|
||||
|
||||
Runtime();
|
||||
public:
|
||||
static ::java::lang::Runtime * getRuntime();
|
||||
virtual void exit(jint);
|
||||
public: // actually package-private
|
||||
static void exitNoChecksAccessor(jint);
|
||||
private:
|
||||
void exitNoChecks(jint);
|
||||
public: // actually package-private
|
||||
virtual jboolean runShutdownHooks();
|
||||
public:
|
||||
virtual void addShutdownHook(::java::lang::Thread *);
|
||||
virtual jboolean removeShutdownHook(::java::lang::Thread *);
|
||||
virtual void halt(jint);
|
||||
static void runFinalizersOnExit(jboolean);
|
||||
virtual ::java::lang::Process * exec(::java::lang::String *);
|
||||
virtual ::java::lang::Process * exec(::java::lang::String *, JArray< ::java::lang::String * > *);
|
||||
virtual ::java::lang::Process * exec(::java::lang::String *, JArray< ::java::lang::String * > *, ::java::io::File *);
|
||||
virtual ::java::lang::Process * exec(JArray< ::java::lang::String * > *);
|
||||
virtual ::java::lang::Process * exec(JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *);
|
||||
virtual ::java::lang::Process * exec(JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, ::java::io::File *);
|
||||
virtual jint availableProcessors();
|
||||
virtual jlong freeMemory();
|
||||
virtual jlong totalMemory();
|
||||
virtual jlong maxMemory();
|
||||
virtual void gc();
|
||||
virtual void runFinalization();
|
||||
virtual void traceInstructions(jboolean);
|
||||
virtual void traceMethodCalls(jboolean);
|
||||
virtual void load(::java::lang::String *);
|
||||
virtual void loadLibrary(::java::lang::String *);
|
||||
virtual ::java::io::InputStream * getLocalizedInputStream(::java::io::InputStream *);
|
||||
virtual ::java::io::OutputStream * getLocalizedOutputStream(::java::io::OutputStream *);
|
||||
public: // actually package-private
|
||||
virtual void exitInternal(jint);
|
||||
virtual void _load(::java::lang::String *, jboolean);
|
||||
virtual jboolean loadLibraryInternal(::java::lang::String *);
|
||||
private:
|
||||
static void init();
|
||||
void runFinalizationForExit();
|
||||
public: // actually package-private
|
||||
static ::java::lang::String * nativeGetLibname(::java::lang::String *, ::java::lang::String *);
|
||||
virtual ::java::lang::Process * execInternal(JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, ::java::io::File *);
|
||||
private:
|
||||
JArray< ::java::lang::String * > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) libpath;
|
||||
::java::lang::Thread * exitSequence;
|
||||
::java::util::Set * shutdownHooks;
|
||||
jboolean finalizeOnExit;
|
||||
static ::java::lang::Runtime * current;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Runtime__
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_RuntimeException__
|
||||
#define __java_lang_RuntimeException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Exception.h>
|
||||
|
||||
class java::lang::RuntimeException : public ::java::lang::Exception
|
||||
{
|
||||
|
||||
public:
|
||||
RuntimeException();
|
||||
RuntimeException(::java::lang::String *);
|
||||
RuntimeException(::java::lang::String *, ::java::lang::Throwable *);
|
||||
RuntimeException(::java::lang::Throwable *);
|
||||
private:
|
||||
static const jlong serialVersionUID = -7034897190745766939LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_RuntimeException__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_RuntimePermission__
|
||||
#define __java_lang_RuntimePermission__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/security/BasicPermission.h>
|
||||
|
||||
class java::lang::RuntimePermission : public ::java::security::BasicPermission
|
||||
{
|
||||
|
||||
public:
|
||||
RuntimePermission(::java::lang::String *);
|
||||
RuntimePermission(::java::lang::String *, ::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 7399184964622342223LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_RuntimePermission__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// 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__
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_SecurityException__
|
||||
#define __java_lang_SecurityException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/RuntimeException.h>
|
||||
|
||||
class java::lang::SecurityException : public ::java::lang::RuntimeException
|
||||
{
|
||||
|
||||
public:
|
||||
SecurityException();
|
||||
SecurityException(::java::lang::String *);
|
||||
SecurityException(::java::lang::String *, ::java::lang::Throwable *);
|
||||
SecurityException(::java::lang::Throwable *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 6878364983674394167LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_SecurityException__
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_SecurityManager$1__
|
||||
#define __java_lang_SecurityManager$1__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::SecurityManager$1 : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public: // actually package-private
|
||||
SecurityManager$1(::java::lang::SecurityManager *, ::java::lang::String *);
|
||||
public:
|
||||
::java::lang::Object * run();
|
||||
public: // actually package-private
|
||||
::java::lang::SecurityManager * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$0;
|
||||
private:
|
||||
::java::lang::String * val$restriction;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_SecurityManager$1__
|
||||
@@ -0,0 +1,84 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_SecurityManager__
|
||||
#define __java_lang_SecurityManager__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
extern "Java"
|
||||
{
|
||||
namespace java
|
||||
{
|
||||
namespace net
|
||||
{
|
||||
class InetAddress;
|
||||
}
|
||||
namespace security
|
||||
{
|
||||
class Permission;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class java::lang::SecurityManager : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
SecurityManager();
|
||||
virtual jboolean getInCheck();
|
||||
public: // actually protected
|
||||
virtual JArray< ::java::lang::Class * > * getClassContext();
|
||||
virtual ::java::lang::ClassLoader * currentClassLoader();
|
||||
virtual ::java::lang::Class * currentLoadedClass();
|
||||
virtual jint classDepth(::java::lang::String *);
|
||||
virtual jint classLoaderDepth();
|
||||
virtual jboolean inClass(::java::lang::String *);
|
||||
virtual jboolean inClassLoader();
|
||||
public:
|
||||
virtual ::java::lang::Object * getSecurityContext();
|
||||
virtual void checkPermission(::java::security::Permission *);
|
||||
virtual void checkPermission(::java::security::Permission *, ::java::lang::Object *);
|
||||
virtual void checkCreateClassLoader();
|
||||
virtual void checkAccess(::java::lang::Thread *);
|
||||
virtual void checkAccess(::java::lang::ThreadGroup *);
|
||||
virtual void checkExit(jint);
|
||||
virtual void checkExec(::java::lang::String *);
|
||||
virtual void checkLink(::java::lang::String *);
|
||||
virtual void checkRead(::java::io::FileDescriptor *);
|
||||
virtual void checkRead(::java::lang::String *);
|
||||
virtual void checkRead(::java::lang::String *, ::java::lang::Object *);
|
||||
virtual void checkWrite(::java::io::FileDescriptor *);
|
||||
virtual void checkWrite(::java::lang::String *);
|
||||
virtual void checkDelete(::java::lang::String *);
|
||||
virtual void checkConnect(::java::lang::String *, jint);
|
||||
virtual void checkConnect(::java::lang::String *, jint, ::java::lang::Object *);
|
||||
virtual void checkListen(jint);
|
||||
virtual void checkAccept(::java::lang::String *, jint);
|
||||
virtual void checkMulticast(::java::net::InetAddress *);
|
||||
virtual void checkMulticast(::java::net::InetAddress *, jbyte);
|
||||
virtual void checkPropertiesAccess();
|
||||
virtual void checkPropertyAccess(::java::lang::String *);
|
||||
virtual jboolean checkTopLevelWindow(::java::lang::Object *);
|
||||
virtual void checkPrintJobAccess();
|
||||
virtual void checkSystemClipboardAccess();
|
||||
virtual void checkAwtEventQueueAccess();
|
||||
virtual void checkPackageAccess(::java::lang::String *);
|
||||
virtual void checkPackageDefinition(::java::lang::String *);
|
||||
virtual void checkSetFactory();
|
||||
virtual void checkMemberAccess(::java::lang::Class *, jint);
|
||||
virtual void checkSecurityAccess(::java::lang::String *);
|
||||
virtual ::java::lang::ThreadGroup * getThreadGroup();
|
||||
public: // actually package-private
|
||||
virtual void checkPackageList(::java::lang::String *, ::java::lang::String *, ::java::lang::String *);
|
||||
static volatile ::java::lang::SecurityManager * current;
|
||||
public: // actually protected
|
||||
jboolean __attribute__((aligned(__alignof__( ::java::lang::Object)))) inCheck;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_SecurityManager__
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,54 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Short__
|
||||
#define __java_lang_Short__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Number.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::Short : public ::java::lang::Number
|
||||
{
|
||||
|
||||
public:
|
||||
Short(jshort);
|
||||
Short(::java::lang::String *);
|
||||
static ::java::lang::String * toString(jshort);
|
||||
static jshort parseShort(::java::lang::String *);
|
||||
static jshort parseShort(::java::lang::String *, jint);
|
||||
static ::java::lang::Short * valueOf(::java::lang::String *, jint);
|
||||
static ::java::lang::Short * valueOf(::java::lang::String *);
|
||||
static ::java::lang::Short * valueOf(jshort);
|
||||
static ::java::lang::Short * decode(::java::lang::String *);
|
||||
jbyte byteValue();
|
||||
jshort shortValue();
|
||||
jint intValue();
|
||||
jlong longValue();
|
||||
jfloat floatValue();
|
||||
jdouble doubleValue();
|
||||
::java::lang::String * toString();
|
||||
jint hashCode();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
jint target$compareTo(::java::lang::Short *);
|
||||
static jshort reverseBytes(jshort);
|
||||
jint compareTo(::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 7515723908773894738LL;
|
||||
public:
|
||||
static const jshort MIN_VALUE = -32768;
|
||||
static const jshort MAX_VALUE = 32767;
|
||||
static ::java::lang::Class * TYPE;
|
||||
static const jint SIZE = 16;
|
||||
private:
|
||||
static const jint MIN_CACHE = -128;
|
||||
static const jint MAX_CACHE = 127;
|
||||
static JArray< ::java::lang::Short * > * shortCache;
|
||||
jshort __attribute__((aligned(__alignof__( ::java::lang::Number)))) value;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Short__
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_StackOverflowError__
|
||||
#define __java_lang_StackOverflowError__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/VirtualMachineError.h>
|
||||
|
||||
class java::lang::StackOverflowError : public ::java::lang::VirtualMachineError
|
||||
{
|
||||
|
||||
public:
|
||||
StackOverflowError();
|
||||
StackOverflowError(::java::lang::String *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 8609175038441759607LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_StackOverflowError__
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_StackTraceElement__
|
||||
#define __java_lang_StackTraceElement__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::StackTraceElement : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public: // actually package-private
|
||||
StackTraceElement(::java::lang::String *, jint, ::java::lang::String *, ::java::lang::String *, jboolean);
|
||||
public:
|
||||
StackTraceElement(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, jint);
|
||||
::java::lang::String * getFileName();
|
||||
jint getLineNumber();
|
||||
::java::lang::String * getClassName();
|
||||
::java::lang::String * getMethodName();
|
||||
jboolean isNativeMethod();
|
||||
::java::lang::String * toString();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
jint hashCode();
|
||||
private:
|
||||
static jboolean equals(::java::lang::Object *, ::java::lang::Object *);
|
||||
static jint hashCode(::java::lang::Object *);
|
||||
static const jlong serialVersionUID = 6992337162326171013LL;
|
||||
::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) fileName;
|
||||
jint lineNumber;
|
||||
::java::lang::String * declaringClass;
|
||||
::java::lang::String * methodName;
|
||||
jboolean isNative;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_StackTraceElement__
|
||||
@@ -0,0 +1,203 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_StrictMath__
|
||||
#define __java_lang_StrictMath__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::StrictMath : public ::java::lang::Object
|
||||
{
|
||||
|
||||
StrictMath();
|
||||
public:
|
||||
static jint abs(jint);
|
||||
static jlong abs(jlong);
|
||||
static jfloat abs(jfloat);
|
||||
static jdouble abs(jdouble);
|
||||
static jint min(jint, jint);
|
||||
static jlong min(jlong, jlong);
|
||||
static jfloat min(jfloat, jfloat);
|
||||
static jdouble min(jdouble, jdouble);
|
||||
static jint max(jint, jint);
|
||||
static jlong max(jlong, jlong);
|
||||
static jfloat max(jfloat, jfloat);
|
||||
static jdouble max(jdouble, jdouble);
|
||||
static jdouble sin(jdouble);
|
||||
static jdouble cos(jdouble);
|
||||
static jdouble tan(jdouble);
|
||||
static jdouble asin(jdouble);
|
||||
static jdouble acos(jdouble);
|
||||
static jdouble atan(jdouble);
|
||||
static jdouble atan2(jdouble, jdouble);
|
||||
static jdouble sinh(jdouble);
|
||||
static jdouble cosh(jdouble);
|
||||
static jdouble tanh(jdouble);
|
||||
private:
|
||||
static jlong getLowDWord(jlong);
|
||||
static jlong getHighDWord(jlong);
|
||||
static jdouble buildDouble(jlong, jlong);
|
||||
public:
|
||||
static jdouble cbrt(jdouble);
|
||||
static jdouble exp(jdouble);
|
||||
static jdouble expm1(jdouble);
|
||||
static jdouble log(jdouble);
|
||||
static jdouble sqrt(jdouble);
|
||||
static jdouble pow(jdouble, jdouble);
|
||||
static jdouble IEEEremainder(jdouble, jdouble);
|
||||
static jdouble ceil(jdouble);
|
||||
static jdouble floor(jdouble);
|
||||
static jdouble rint(jdouble);
|
||||
static jint round(jfloat);
|
||||
static jlong round(jdouble);
|
||||
static jdouble random();
|
||||
static jdouble toRadians(jdouble);
|
||||
static jdouble toDegrees(jdouble);
|
||||
private:
|
||||
static jint remPiOver2(jdouble, JArray< jdouble > *);
|
||||
static jint remPiOver2(JArray< jdouble > *, JArray< jdouble > *, jint, jint);
|
||||
static jdouble scale(jdouble, jint);
|
||||
static jdouble sin(jdouble, jdouble);
|
||||
static jdouble cos(jdouble, jdouble);
|
||||
static jdouble tan(jdouble, jdouble, jboolean);
|
||||
public:
|
||||
static jdouble signum(jdouble);
|
||||
static jfloat signum(jfloat);
|
||||
static jdouble ulp(jdouble);
|
||||
static jfloat ulp(jfloat);
|
||||
private:
|
||||
static ::java::util::Random * rand;
|
||||
public:
|
||||
static jdouble E;
|
||||
static jdouble PI;
|
||||
private:
|
||||
static jdouble TWO_16;
|
||||
static jdouble TWO_20;
|
||||
static jdouble TWO_24;
|
||||
static jdouble TWO_27;
|
||||
static jdouble TWO_28;
|
||||
static jdouble TWO_29;
|
||||
static jdouble TWO_31;
|
||||
static jdouble TWO_49;
|
||||
static jdouble TWO_52;
|
||||
static jdouble TWO_54;
|
||||
static jdouble TWO_57;
|
||||
static jdouble TWO_60;
|
||||
static jdouble TWO_64;
|
||||
static jdouble TWO_66;
|
||||
static jdouble TWO_1023;
|
||||
static JArray< jint > * TWO_OVER_PI;
|
||||
static JArray< jdouble > * PI_OVER_TWO;
|
||||
static jdouble PI_L;
|
||||
static jdouble PIO2_1;
|
||||
static jdouble PIO2_1L;
|
||||
static jdouble PIO2_2;
|
||||
static jdouble PIO2_2L;
|
||||
static jdouble PIO2_3;
|
||||
static jdouble PIO2_3L;
|
||||
static jdouble SQRT_1_5;
|
||||
static jdouble SQRT_2;
|
||||
static jdouble SQRT_3;
|
||||
static jdouble EXP_LIMIT_H;
|
||||
static jdouble EXP_LIMIT_L;
|
||||
static jdouble CP;
|
||||
static jdouble CP_H;
|
||||
static jdouble CP_L;
|
||||
static jdouble LN2;
|
||||
static jdouble LN2_H;
|
||||
static jdouble LN2_L;
|
||||
static jdouble INV_LN2;
|
||||
static jdouble INV_LN2_H;
|
||||
static jdouble INV_LN2_L;
|
||||
static jdouble LG1;
|
||||
static jdouble LG2;
|
||||
static jdouble LG3;
|
||||
static jdouble LG4;
|
||||
static jdouble LG5;
|
||||
static jdouble LG6;
|
||||
static jdouble LG7;
|
||||
static jdouble L1;
|
||||
static jdouble L2;
|
||||
static jdouble L3;
|
||||
static jdouble L4;
|
||||
static jdouble L5;
|
||||
static jdouble L6;
|
||||
static jdouble P1;
|
||||
static jdouble P2;
|
||||
static jdouble P3;
|
||||
static jdouble P4;
|
||||
static jdouble P5;
|
||||
static jdouble DP_H;
|
||||
static jdouble DP_L;
|
||||
static jdouble OVT;
|
||||
static jdouble S1;
|
||||
static jdouble S2;
|
||||
static jdouble S3;
|
||||
static jdouble S4;
|
||||
static jdouble S5;
|
||||
static jdouble S6;
|
||||
static jdouble C1;
|
||||
static jdouble C2;
|
||||
static jdouble C3;
|
||||
static jdouble C4;
|
||||
static jdouble C5;
|
||||
static jdouble C6;
|
||||
static jdouble T0;
|
||||
static jdouble T1;
|
||||
static jdouble T2;
|
||||
static jdouble T3;
|
||||
static jdouble T4;
|
||||
static jdouble T5;
|
||||
static jdouble T6;
|
||||
static jdouble T7;
|
||||
static jdouble T8;
|
||||
static jdouble T9;
|
||||
static jdouble T10;
|
||||
static jdouble T11;
|
||||
static jdouble T12;
|
||||
static jdouble PS0;
|
||||
static jdouble PS1;
|
||||
static jdouble PS2;
|
||||
static jdouble PS3;
|
||||
static jdouble PS4;
|
||||
static jdouble PS5;
|
||||
static jdouble QS1;
|
||||
static jdouble QS2;
|
||||
static jdouble QS3;
|
||||
static jdouble QS4;
|
||||
static jdouble ATAN_0_5H;
|
||||
static jdouble ATAN_0_5L;
|
||||
static jdouble ATAN_1_5H;
|
||||
static jdouble ATAN_1_5L;
|
||||
static jdouble AT0;
|
||||
static jdouble AT1;
|
||||
static jdouble AT2;
|
||||
static jdouble AT3;
|
||||
static jdouble AT4;
|
||||
static jdouble AT5;
|
||||
static jdouble AT6;
|
||||
static jdouble AT7;
|
||||
static jdouble AT8;
|
||||
static jdouble AT9;
|
||||
static jdouble AT10;
|
||||
static const jint CBRT_B1 = 715094163;
|
||||
static const jint CBRT_B2 = 696219795;
|
||||
static jdouble CBRT_C;
|
||||
static jdouble CBRT_D;
|
||||
static jdouble CBRT_E;
|
||||
static jdouble CBRT_F;
|
||||
static jdouble CBRT_G;
|
||||
static jdouble EXPM1_Q1;
|
||||
static jdouble EXPM1_Q2;
|
||||
static jdouble EXPM1_Q3;
|
||||
static jdouble EXPM1_Q4;
|
||||
static jdouble EXPM1_Q5;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_StrictMath__
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_String$CaseInsensitiveComparator__
|
||||
#define __java_lang_String$CaseInsensitiveComparator__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::String$CaseInsensitiveComparator : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public: // actually package-private
|
||||
String$CaseInsensitiveComparator();
|
||||
public:
|
||||
jint compare(::java::lang::Object *, ::java::lang::Object *);
|
||||
private:
|
||||
static const jlong serialVersionUID = 8575799808933029326LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_String$CaseInsensitiveComparator__
|
||||
@@ -0,0 +1,138 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_String__
|
||||
#define __java_lang_String__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
extern "Java"
|
||||
{
|
||||
namespace gnu
|
||||
{
|
||||
namespace gcj
|
||||
{
|
||||
namespace runtime
|
||||
{
|
||||
class StringBuffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jchar* _Jv_GetStringChars (jstring str);
|
||||
jstring* _Jv_StringFindSlot (jchar*, jint, jint);
|
||||
jstring* _Jv_StringGetSlot (jstring);
|
||||
jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);
|
||||
jstring _Jv_NewStringLatin1 (const char*, jsize);
|
||||
jstring _Jv_AllocString (jsize);
|
||||
|
||||
class java::lang::String : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
String();
|
||||
String(::java::lang::String *);
|
||||
String(JArray< jchar > *);
|
||||
String(JArray< jchar > *, jint, jint);
|
||||
String(JArray< jbyte > *, jint, jint, jint);
|
||||
String(JArray< jbyte > *, jint);
|
||||
String(JArray< jbyte > *, jint, jint, ::java::lang::String *);
|
||||
String(JArray< jbyte > *, ::java::lang::String *);
|
||||
String(JArray< jbyte > *, jint, jint);
|
||||
String(JArray< jbyte > *);
|
||||
String(::java::lang::StringBuffer *);
|
||||
String(::java::lang::StringBuilder *);
|
||||
public: // actually package-private
|
||||
String(JArray< jchar > *, jint, jint, jboolean);
|
||||
String(::gnu::gcj::runtime::StringBuffer *);
|
||||
public:
|
||||
jint length();
|
||||
jchar charAt(jint);
|
||||
jint codePointAt(jint);
|
||||
jint codePointBefore(jint);
|
||||
void getChars(jint, jint, JArray< jchar > *, jint);
|
||||
void getBytes(jint, jint, JArray< jbyte > *, jint);
|
||||
JArray< jbyte > * getBytes(::java::lang::String *);
|
||||
JArray< jbyte > * getBytes();
|
||||
jboolean equals(::java::lang::Object *);
|
||||
jboolean contentEquals(::java::lang::StringBuffer *);
|
||||
jboolean contentEquals(::java::lang::CharSequence *);
|
||||
jboolean equalsIgnoreCase(::java::lang::String *);
|
||||
jint compareTo(::java::lang::String *);
|
||||
jint compareTo(::java::lang::Object *);
|
||||
jint compareToIgnoreCase(::java::lang::String *);
|
||||
jboolean regionMatches(jint, ::java::lang::String *, jint, jint);
|
||||
jboolean regionMatches(jboolean, jint, ::java::lang::String *, jint, jint);
|
||||
jboolean startsWith(::java::lang::String *, jint);
|
||||
jboolean startsWith(::java::lang::String *);
|
||||
jboolean endsWith(::java::lang::String *);
|
||||
jint hashCode();
|
||||
jint indexOf(jint);
|
||||
jint indexOf(jint, jint);
|
||||
jint lastIndexOf(jint);
|
||||
jint lastIndexOf(jint, jint);
|
||||
jint indexOf(::java::lang::String *);
|
||||
jint indexOf(::java::lang::String *, jint);
|
||||
jint lastIndexOf(::java::lang::String *);
|
||||
jint lastIndexOf(::java::lang::String *, jint);
|
||||
::java::lang::String * substring(jint);
|
||||
::java::lang::String * substring(jint, jint);
|
||||
::java::lang::CharSequence * subSequence(jint, jint);
|
||||
::java::lang::String * concat(::java::lang::String *);
|
||||
::java::lang::String * replace(jchar, jchar);
|
||||
jboolean matches(::java::lang::String *);
|
||||
::java::lang::String * replaceFirst(::java::lang::String *, ::java::lang::String *);
|
||||
::java::lang::String * replaceAll(::java::lang::String *, ::java::lang::String *);
|
||||
JArray< ::java::lang::String * > * split(::java::lang::String *, jint);
|
||||
JArray< ::java::lang::String * > * split(::java::lang::String *);
|
||||
::java::lang::String * toLowerCase(::java::util::Locale *);
|
||||
::java::lang::String * toLowerCase();
|
||||
::java::lang::String * toUpperCase(::java::util::Locale *);
|
||||
::java::lang::String * toUpperCase();
|
||||
::java::lang::String * trim();
|
||||
::java::lang::String * toString();
|
||||
JArray< jchar > * toCharArray();
|
||||
static ::java::lang::String * valueOf(::java::lang::Object *);
|
||||
static ::java::lang::String * valueOf(JArray< jchar > *);
|
||||
static ::java::lang::String * valueOf(JArray< jchar > *, jint, jint);
|
||||
static ::java::lang::String * copyValueOf(JArray< jchar > *, jint, jint);
|
||||
static ::java::lang::String * copyValueOf(JArray< jchar > *);
|
||||
static ::java::lang::String * valueOf(jboolean);
|
||||
static ::java::lang::String * valueOf(jchar);
|
||||
static ::java::lang::String * valueOf(jint);
|
||||
static ::java::lang::String * valueOf(jlong);
|
||||
static ::java::lang::String * valueOf(jfloat);
|
||||
static ::java::lang::String * valueOf(jdouble);
|
||||
::java::lang::String * intern();
|
||||
jint codePointCount(jint, jint);
|
||||
jboolean contains(::java::lang::CharSequence *);
|
||||
::java::lang::String * replace(::java::lang::CharSequence *, ::java::lang::CharSequence *);
|
||||
private:
|
||||
void init(JArray< jchar > *, jint, jint, jboolean);
|
||||
void init(JArray< jbyte > *, jint, jint, jint);
|
||||
void init(JArray< jbyte > *, jint, jint, ::java::lang::String *);
|
||||
void init(::gnu::gcj::runtime::StringBuffer *);
|
||||
static const jlong serialVersionUID = -6849794470754667710LL;
|
||||
::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) data;
|
||||
jint boffset;
|
||||
public: // actually package-private
|
||||
jint count;
|
||||
private:
|
||||
jint cachedHashCode;
|
||||
public:
|
||||
static ::java::util::Comparator * CASE_INSENSITIVE_ORDER;
|
||||
static ::java::lang::Class class$;
|
||||
|
||||
friend jchar* ::_Jv_GetStringChars (jstring str);
|
||||
friend jstring* ::_Jv_StringFindSlot (jchar*, jint, jint);
|
||||
friend jstring* ::_Jv_StringGetSlot (jstring);
|
||||
friend jstring (::_Jv_NewStringUtf8Const) (_Jv_Utf8Const* str);
|
||||
friend jstring (::_Jv_NewStringLatin1) (const char*, jsize);
|
||||
friend jstring (::_Jv_AllocString) (jsize);
|
||||
};
|
||||
|
||||
#endif // __java_lang_String__
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_StringBuffer__
|
||||
#define __java_lang_StringBuffer__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::StringBuffer : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
StringBuffer();
|
||||
StringBuffer(jint);
|
||||
StringBuffer(::java::lang::String *);
|
||||
StringBuffer(::java::lang::CharSequence *);
|
||||
jint length();
|
||||
jint capacity();
|
||||
void ensureCapacity(jint);
|
||||
void setLength(jint);
|
||||
jchar charAt(jint);
|
||||
jint codePointAt(jint);
|
||||
jint codePointBefore(jint);
|
||||
void getChars(jint, jint, JArray< jchar > *, jint);
|
||||
void setCharAt(jint, jchar);
|
||||
::java::lang::StringBuffer * append(::java::lang::Object *);
|
||||
::java::lang::StringBuffer * append(::java::lang::String *);
|
||||
::java::lang::StringBuffer * append(::java::lang::StringBuffer *);
|
||||
::java::lang::StringBuffer * append(::java::lang::CharSequence *);
|
||||
::java::lang::StringBuffer * append(::java::lang::CharSequence *, jint, jint);
|
||||
::java::lang::StringBuffer * append(JArray< jchar > *);
|
||||
::java::lang::StringBuffer * append(JArray< jchar > *, jint, jint);
|
||||
::java::lang::StringBuffer * append(jboolean);
|
||||
::java::lang::StringBuffer * append(jchar);
|
||||
::java::lang::StringBuffer * appendCodePoint(jint);
|
||||
::java::lang::StringBuffer * append(jint);
|
||||
::java::lang::StringBuffer * append(jlong);
|
||||
::java::lang::StringBuffer * append(jfloat);
|
||||
::java::lang::StringBuffer * append(jdouble);
|
||||
::java::lang::StringBuffer * delete$(jint, jint);
|
||||
::java::lang::StringBuffer * deleteCharAt(jint);
|
||||
::java::lang::StringBuffer * replace(jint, jint, ::java::lang::String *);
|
||||
::java::lang::String * substring(jint);
|
||||
::java::lang::CharSequence * subSequence(jint, jint);
|
||||
::java::lang::String * substring(jint, jint);
|
||||
::java::lang::StringBuffer * insert(jint, JArray< jchar > *, jint, jint);
|
||||
::java::lang::StringBuffer * insert(jint, ::java::lang::Object *);
|
||||
::java::lang::StringBuffer * insert(jint, ::java::lang::String *);
|
||||
::java::lang::StringBuffer * insert(jint, ::java::lang::CharSequence *);
|
||||
::java::lang::StringBuffer * insert(jint, ::java::lang::CharSequence *, jint, jint);
|
||||
::java::lang::StringBuffer * insert(jint, JArray< jchar > *);
|
||||
::java::lang::StringBuffer * insert(jint, jboolean);
|
||||
::java::lang::StringBuffer * insert(jint, jchar);
|
||||
::java::lang::StringBuffer * insert(jint, jint);
|
||||
::java::lang::StringBuffer * insert(jint, jlong);
|
||||
::java::lang::StringBuffer * insert(jint, jfloat);
|
||||
::java::lang::StringBuffer * insert(jint, jdouble);
|
||||
jint indexOf(::java::lang::String *);
|
||||
jint indexOf(::java::lang::String *, jint);
|
||||
jint lastIndexOf(::java::lang::String *);
|
||||
jint lastIndexOf(::java::lang::String *, jint);
|
||||
::java::lang::StringBuffer * reverse();
|
||||
::java::lang::String * toString();
|
||||
void trimToSize();
|
||||
jint codePointCount(jint, jint);
|
||||
jint offsetByCodePoints(jint, jint);
|
||||
private:
|
||||
void ensureCapacity_unsynchronized(jint);
|
||||
jboolean regionMatches(jint, ::java::lang::String *);
|
||||
static const jlong serialVersionUID = 3388685877147921107LL;
|
||||
public: // actually package-private
|
||||
jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) count;
|
||||
JArray< jchar > * value;
|
||||
jboolean shared;
|
||||
private:
|
||||
static const jint DEFAULT_CAPACITY = 16;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_StringBuffer__
|
||||
@@ -0,0 +1,83 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_StringBuilder__
|
||||
#define __java_lang_StringBuilder__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::StringBuilder : public ::java::lang::Object
|
||||
{
|
||||
|
||||
public:
|
||||
StringBuilder();
|
||||
StringBuilder(jint);
|
||||
StringBuilder(::java::lang::String *);
|
||||
StringBuilder(::java::lang::CharSequence *);
|
||||
jint length();
|
||||
jint capacity();
|
||||
void ensureCapacity(jint);
|
||||
void setLength(jint);
|
||||
jchar charAt(jint);
|
||||
void getChars(jint, jint, JArray< jchar > *, jint);
|
||||
void setCharAt(jint, jchar);
|
||||
::java::lang::StringBuilder * append(::java::lang::Object *);
|
||||
::java::lang::StringBuilder * append(::java::lang::String *);
|
||||
::java::lang::StringBuilder * append(::java::lang::StringBuffer *);
|
||||
::java::lang::StringBuilder * append(JArray< jchar > *);
|
||||
::java::lang::StringBuilder * append(JArray< jchar > *, jint, jint);
|
||||
::java::lang::StringBuilder * append(jboolean);
|
||||
::java::lang::StringBuilder * target$append(jchar);
|
||||
::java::lang::StringBuilder * target$append(::java::lang::CharSequence *);
|
||||
::java::lang::StringBuilder * target$append(::java::lang::CharSequence *, jint, jint);
|
||||
::java::lang::StringBuilder * appendCodePoint(jint);
|
||||
::java::lang::StringBuilder * append(jint);
|
||||
::java::lang::StringBuilder * append(jlong);
|
||||
::java::lang::StringBuilder * append(jfloat);
|
||||
::java::lang::StringBuilder * append(jdouble);
|
||||
::java::lang::StringBuilder * delete$(jint, jint);
|
||||
::java::lang::StringBuilder * deleteCharAt(jint);
|
||||
::java::lang::StringBuilder * replace(jint, jint, ::java::lang::String *);
|
||||
::java::lang::String * substring(jint);
|
||||
::java::lang::CharSequence * subSequence(jint, jint);
|
||||
::java::lang::String * substring(jint, jint);
|
||||
::java::lang::StringBuilder * insert(jint, JArray< jchar > *, jint, jint);
|
||||
::java::lang::StringBuilder * insert(jint, ::java::lang::Object *);
|
||||
::java::lang::StringBuilder * insert(jint, ::java::lang::String *);
|
||||
::java::lang::StringBuilder * insert(jint, ::java::lang::CharSequence *);
|
||||
::java::lang::StringBuilder * insert(jint, ::java::lang::CharSequence *, jint, jint);
|
||||
::java::lang::StringBuilder * insert(jint, JArray< jchar > *);
|
||||
::java::lang::StringBuilder * insert(jint, jboolean);
|
||||
::java::lang::StringBuilder * insert(jint, jchar);
|
||||
::java::lang::StringBuilder * insert(jint, jint);
|
||||
::java::lang::StringBuilder * insert(jint, jlong);
|
||||
::java::lang::StringBuilder * insert(jint, jfloat);
|
||||
::java::lang::StringBuilder * insert(jint, jdouble);
|
||||
jint indexOf(::java::lang::String *);
|
||||
jint indexOf(::java::lang::String *, jint);
|
||||
jint lastIndexOf(::java::lang::String *);
|
||||
jint lastIndexOf(::java::lang::String *, jint);
|
||||
::java::lang::StringBuilder * reverse();
|
||||
::java::lang::String * toString();
|
||||
private:
|
||||
jboolean regionMatches(jint, ::java::lang::String *);
|
||||
public:
|
||||
::java::lang::Appendable * append(::java::lang::CharSequence *, jint, jint);
|
||||
::java::lang::Appendable * append(::java::lang::CharSequence *);
|
||||
::java::lang::Appendable * append(jchar);
|
||||
private:
|
||||
static const jlong serialVersionUID = 4383685877147921099LL;
|
||||
public: // actually package-private
|
||||
jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) count;
|
||||
JArray< jchar > * value;
|
||||
private:
|
||||
static const jint DEFAULT_CAPACITY = 16;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_StringBuilder__
|
||||
@@ -74,9 +74,8 @@ import java.io.Serializable;
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
// FIX15: Implement Appendable when co-variant methods are available
|
||||
public final class StringBuilder
|
||||
implements Serializable, CharSequence
|
||||
implements Serializable, CharSequence, Appendable
|
||||
{
|
||||
// Implementation note: if you change this class, you usually will
|
||||
// want to change StringBuffer as well.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_StringIndexOutOfBoundsException__
|
||||
#define __java_lang_StringIndexOutOfBoundsException__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/IndexOutOfBoundsException.h>
|
||||
|
||||
class java::lang::StringIndexOutOfBoundsException : public ::java::lang::IndexOutOfBoundsException
|
||||
{
|
||||
|
||||
public:
|
||||
StringIndexOutOfBoundsException();
|
||||
StringIndexOutOfBoundsException(::java::lang::String *);
|
||||
StringIndexOutOfBoundsException(jint);
|
||||
private:
|
||||
static const jlong serialVersionUID = -6762910422159637258LL;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_StringIndexOutOfBoundsException__
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_SuppressWarnings__
|
||||
#define __java_lang_SuppressWarnings__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::SuppressWarnings : 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_lang_SuppressWarnings__
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_System$EnvironmentCollection__
|
||||
#define __java_lang_System$EnvironmentCollection__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/util/AbstractCollection.h>
|
||||
|
||||
class java::lang::System$EnvironmentCollection : public ::java::util::AbstractCollection
|
||||
{
|
||||
|
||||
public:
|
||||
System$EnvironmentCollection(::java::util::Collection *);
|
||||
virtual jboolean contains(::java::lang::Object *);
|
||||
virtual jboolean containsAll(::java::util::Collection *);
|
||||
virtual ::java::util::Iterator * iterator();
|
||||
virtual jboolean remove(::java::lang::Object *);
|
||||
virtual jboolean removeAll(::java::util::Collection *);
|
||||
virtual jboolean retainAll(::java::util::Collection *);
|
||||
virtual jint size();
|
||||
public: // actually protected
|
||||
::java::util::Collection * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) c;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_System$EnvironmentCollection__
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_System$EnvironmentMap__
|
||||
#define __java_lang_System$EnvironmentMap__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/util/HashMap.h>
|
||||
|
||||
class java::lang::System$EnvironmentMap : public ::java::util::HashMap
|
||||
{
|
||||
|
||||
public: // actually package-private
|
||||
System$EnvironmentMap();
|
||||
public:
|
||||
virtual jboolean containsKey(::java::lang::Object *);
|
||||
virtual jboolean containsValue(::java::lang::Object *);
|
||||
virtual ::java::util::Set * entrySet();
|
||||
virtual ::java::lang::String * target$get(::java::lang::Object *);
|
||||
virtual ::java::util::Set * keySet();
|
||||
virtual ::java::lang::String * target$remove(::java::lang::Object *);
|
||||
virtual ::java::util::Collection * values();
|
||||
virtual ::java::lang::Object * get(::java::lang::Object *);
|
||||
virtual ::java::lang::Object * remove(::java::lang::Object *);
|
||||
private:
|
||||
::java::util::Set * __attribute__((aligned(__alignof__( ::java::util::HashMap)))) entries;
|
||||
::java::util::Set * keys;
|
||||
::java::util::Collection * values__;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_System$EnvironmentMap__
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_System$EnvironmentSet__
|
||||
#define __java_lang_System$EnvironmentSet__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/System$EnvironmentCollection.h>
|
||||
|
||||
class java::lang::System$EnvironmentSet : public ::java::lang::System$EnvironmentCollection
|
||||
{
|
||||
|
||||
public:
|
||||
System$EnvironmentSet(::java::util::Set *);
|
||||
virtual jboolean equals(::java::lang::Object *);
|
||||
virtual jint hashCode();
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_System$EnvironmentSet__
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_System__
|
||||
#define __java_lang_System__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Object.h>
|
||||
|
||||
class java::lang::System : public ::java::lang::Object
|
||||
{
|
||||
|
||||
System();
|
||||
public:
|
||||
static void setIn(::java::io::InputStream *);
|
||||
static void setOut(::java::io::PrintStream *);
|
||||
static void setErr(::java::io::PrintStream *);
|
||||
static void setSecurityManager(::java::lang::SecurityManager *);
|
||||
static ::java::lang::SecurityManager * getSecurityManager();
|
||||
static jlong currentTimeMillis();
|
||||
static jlong nanoTime();
|
||||
static void arraycopy(::java::lang::Object *, jint, ::java::lang::Object *, jint, jint);
|
||||
static jint identityHashCode(::java::lang::Object *);
|
||||
static ::java::util::Properties * getProperties();
|
||||
static void setProperties(::java::util::Properties *);
|
||||
static ::java::lang::String * getProperty(::java::lang::String *);
|
||||
static ::java::lang::String * getProperty(::java::lang::String *, ::java::lang::String *);
|
||||
static ::java::lang::String * setProperty(::java::lang::String *, ::java::lang::String *);
|
||||
static ::java::lang::String * clearProperty(::java::lang::String *);
|
||||
static ::java::lang::String * getenv(::java::lang::String *);
|
||||
static ::java::util::Map * getenv();
|
||||
static void exit(jint);
|
||||
static void gc();
|
||||
static void runFinalization();
|
||||
static void runFinalizersOnExit(jboolean);
|
||||
static void load(::java::lang::String *);
|
||||
static void loadLibrary(::java::lang::String *);
|
||||
static ::java::lang::String * mapLibraryName(::java::lang::String *);
|
||||
private:
|
||||
static void setIn0(::java::io::InputStream *);
|
||||
static void setOut0(::java::io::PrintStream *);
|
||||
static void setErr0(::java::io::PrintStream *);
|
||||
public: // actually package-private
|
||||
static ::java::lang::String * getenv0(::java::lang::String *);
|
||||
public:
|
||||
static ::java::io::InputStream * in;
|
||||
static ::java::io::PrintStream * out;
|
||||
static ::java::io::PrintStream * err;
|
||||
private:
|
||||
static ::java::util::Map * environmentMap;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_System__
|
||||
@@ -48,6 +48,15 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.util.AbstractCollection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Properties;
|
||||
import java.util.PropertyPermission;
|
||||
|
||||
@@ -102,6 +111,11 @@ public final class System
|
||||
public static final PrintStream err
|
||||
= new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.err)), true);
|
||||
|
||||
/**
|
||||
* A cached copy of the environment variable map.
|
||||
*/
|
||||
private static Map<String,String> environmentMap;
|
||||
|
||||
/**
|
||||
* This class is uninstantiable.
|
||||
*/
|
||||
@@ -393,6 +407,29 @@ public final class System
|
||||
return SystemProperties.setProperty(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a single system property by name. A security check may be
|
||||
* performed, <code>checkPropertyAccess(key, "write")</code>.
|
||||
*
|
||||
* @param key the name of the system property to remove
|
||||
* @return the previous value, or null
|
||||
* @throws SecurityException if permission is denied
|
||||
* @throws NullPointerException if key is null
|
||||
* @throws IllegalArgumentException if key is ""
|
||||
* @since 1.5
|
||||
*/
|
||||
public static String clearProperty(String key)
|
||||
{
|
||||
SecurityManager sm = SecurityManager.current; // Be thread-safe.
|
||||
if (sm != null)
|
||||
sm.checkPermission(new PropertyPermission(key, "write"));
|
||||
// This handles both the null pointer exception and the illegal
|
||||
// argument exception.
|
||||
if (key.length() == 0)
|
||||
throw new IllegalArgumentException("key can't be empty");
|
||||
return SystemProperties.remove(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of an environment variable.
|
||||
*
|
||||
@@ -415,6 +452,59 @@ public final class System
|
||||
return getenv0(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Returns an unmodifiable view of the system environment variables.
|
||||
* If the underlying system does not support environment variables,
|
||||
* an empty map is returned.
|
||||
* </p>
|
||||
* <p>
|
||||
* The returned map is read-only and does not accept queries using
|
||||
* null keys or values, or those of a type other than <code>String</code>.
|
||||
* Attempts to modify the map will throw an
|
||||
* <code>UnsupportedOperationException</code>, while attempts
|
||||
* to pass in a null value will throw a
|
||||
* <code>NullPointerException</code>. Types other than <code>String</code>
|
||||
* throw a <code>ClassCastException</code>.
|
||||
* </p>
|
||||
* <p>
|
||||
* As the returned map is generated using data from the underlying
|
||||
* platform, it may not comply with the <code>equals()</code>
|
||||
* and <code>hashCode()</code> contracts. It is also likely that
|
||||
* the keys of this map will be case-sensitive.
|
||||
* </p>
|
||||
* <p>
|
||||
* Use of this method may require a security check for the
|
||||
* RuntimePermission "getenv.*".
|
||||
* </p>
|
||||
*
|
||||
* @return a map of the system environment variables.
|
||||
* @throws SecurityException if the checkPermission method of
|
||||
* an installed security manager prevents access to
|
||||
* the system environment variables.
|
||||
* @since 1.5
|
||||
*/
|
||||
public static Map<String, String> getenv()
|
||||
{
|
||||
SecurityManager sm = SecurityManager.current; // Be thread-safe.
|
||||
if (sm != null)
|
||||
sm.checkPermission(new RuntimePermission("getenv.*"));
|
||||
if (environmentMap == null)
|
||||
{
|
||||
// List<String> environ = (List<String>)VMSystem.environ();
|
||||
// FIXME
|
||||
List<String> environ = new ArrayList<String>();
|
||||
Map<String,String> variables = new EnvironmentMap();
|
||||
for (String pair : environ)
|
||||
{
|
||||
String[] parts = pair.split("=");
|
||||
variables.put(parts[0], parts[1]);
|
||||
}
|
||||
environmentMap = Collections.unmodifiableMap(variables);
|
||||
}
|
||||
return environmentMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Terminate the Virtual Machine. This just calls
|
||||
* <code>Runtime.getRuntime().exit(status)</code>, and never returns.
|
||||
@@ -557,4 +647,382 @@ public final class System
|
||||
* @see #getenv(String)
|
||||
*/
|
||||
static native String getenv0(String name);
|
||||
|
||||
|
||||
/**
|
||||
* This is a specialised <code>Collection</code>, providing
|
||||
* the necessary provisions for the collections used by the
|
||||
* environment variable map. Namely, it prevents
|
||||
* querying anything but <code>String</code>s.
|
||||
*
|
||||
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
|
||||
*/
|
||||
private static class EnvironmentCollection
|
||||
extends AbstractCollection<String>
|
||||
{
|
||||
|
||||
/**
|
||||
* The wrapped collection.
|
||||
*/
|
||||
protected Collection<String> c;
|
||||
|
||||
/**
|
||||
* Constructs a new environment collection, which
|
||||
* wraps the elements of the supplied collection.
|
||||
*
|
||||
* @param coll the collection to use as a base for
|
||||
* this collection.
|
||||
*/
|
||||
public EnvironmentCollection(Collection<String> coll)
|
||||
{
|
||||
c = coll;
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks queries containing a null object or an object which
|
||||
* isn't of type <code>String</code>. All other queries
|
||||
* are forwarded to the underlying collection.
|
||||
*
|
||||
* @param obj the object to look for.
|
||||
* @return true if the object exists in the collection.
|
||||
* @throws NullPointerException if the specified object is null.
|
||||
* @throws ClassCastException if the specified object is not a String.
|
||||
*/
|
||||
public boolean contains(Object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
throw new
|
||||
NullPointerException("This collection does not support " +
|
||||
"null values.");
|
||||
if (!(obj instanceof String))
|
||||
throw new
|
||||
ClassCastException("This collection only supports Strings.");
|
||||
return c.contains(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks queries where the collection contains a null object or
|
||||
* an object which isn't of type <code>String</code>. All other
|
||||
* queries are forwarded to the underlying collection.
|
||||
*
|
||||
* @param coll the collection of objects to look for.
|
||||
* @return true if the collection contains all elements in the collection.
|
||||
* @throws NullPointerException if the collection is null.
|
||||
* @throws NullPointerException if any collection entry is null.
|
||||
* @throws ClassCastException if any collection entry is not a String.
|
||||
*/
|
||||
public boolean containsAll(Collection<?> coll)
|
||||
{
|
||||
for (Object o: coll)
|
||||
{
|
||||
if (o == null)
|
||||
throw new
|
||||
NullPointerException("This collection does not support " +
|
||||
"null values.");
|
||||
if (!(o instanceof String))
|
||||
throw new
|
||||
ClassCastException("This collection only supports Strings.");
|
||||
}
|
||||
return c.containsAll(coll);
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns an iterator over the map elements, with the
|
||||
* same provisions as for the collection and underlying map.
|
||||
*
|
||||
* @return an iterator over the map elements.
|
||||
*/
|
||||
public Iterator<String> iterator()
|
||||
{
|
||||
return c.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks the removal of elements from the collection.
|
||||
*
|
||||
* @return true if the removal was sucessful.
|
||||
* @throws NullPointerException if the collection is null.
|
||||
* @throws NullPointerException if any collection entry is null.
|
||||
* @throws ClassCastException if any collection entry is not a String.
|
||||
*/
|
||||
public boolean remove(Object key)
|
||||
{
|
||||
if (key == null)
|
||||
throw new
|
||||
NullPointerException("This collection does not support " +
|
||||
"null values.");
|
||||
if (!(key instanceof String))
|
||||
throw new
|
||||
ClassCastException("This collection only supports Strings.");
|
||||
return c.contains(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks the removal of all elements in the specified
|
||||
* collection from the collection.
|
||||
*
|
||||
* @param coll the collection of elements to remove.
|
||||
* @return true if the elements were removed.
|
||||
* @throws NullPointerException if the collection is null.
|
||||
* @throws NullPointerException if any collection entry is null.
|
||||
* @throws ClassCastException if any collection entry is not a String.
|
||||
*/
|
||||
public boolean removeAll(Collection<?> coll)
|
||||
{
|
||||
for (Object o: coll)
|
||||
{
|
||||
if (o == null)
|
||||
throw new
|
||||
NullPointerException("This collection does not support " +
|
||||
"null values.");
|
||||
if (!(o instanceof String))
|
||||
throw new
|
||||
ClassCastException("This collection only supports Strings.");
|
||||
}
|
||||
return c.removeAll(coll);
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks the retention of all elements in the specified
|
||||
* collection from the collection.
|
||||
*
|
||||
* @param c the collection of elements to retain.
|
||||
* @return true if the other elements were removed.
|
||||
* @throws NullPointerException if the collection is null.
|
||||
* @throws NullPointerException if any collection entry is null.
|
||||
* @throws ClassCastException if any collection entry is not a String.
|
||||
*/
|
||||
public boolean retainAll(Collection<?> coll)
|
||||
{
|
||||
for (Object o: coll)
|
||||
{
|
||||
if (o == null)
|
||||
throw new
|
||||
NullPointerException("This collection does not support " +
|
||||
"null values.");
|
||||
if (!(o instanceof String))
|
||||
throw new
|
||||
ClassCastException("This collection only supports Strings.");
|
||||
}
|
||||
return c.containsAll(coll);
|
||||
}
|
||||
|
||||
/**
|
||||
* This simply calls the same method on the wrapped
|
||||
* collection.
|
||||
*
|
||||
* @return the size of the underlying collection.
|
||||
*/
|
||||
public int size()
|
||||
{
|
||||
return c.size();
|
||||
}
|
||||
|
||||
} // class EnvironmentCollection<String>
|
||||
|
||||
/**
|
||||
* This is a specialised <code>HashMap</code>, which
|
||||
* prevents the addition or querying of anything other than
|
||||
* <code>String</code> objects.
|
||||
*
|
||||
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
|
||||
*/
|
||||
private static class EnvironmentMap
|
||||
extends HashMap<String,String>
|
||||
{
|
||||
|
||||
/**
|
||||
* Cache the entry set.
|
||||
*/
|
||||
private transient Set<Map.Entry<String,String>> entries;
|
||||
|
||||
/**
|
||||
* Cache the key set.
|
||||
*/
|
||||
private transient Set<String> keys;
|
||||
|
||||
/**
|
||||
* Cache the value collection.
|
||||
*/
|
||||
private transient Collection<String> values;
|
||||
|
||||
/**
|
||||
* Constructs a new empty <code>EnvironmentMap</code>.
|
||||
*/
|
||||
EnvironmentMap()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks queries containing a null key or one which is not
|
||||
* of type <code>String</code>. All other queries
|
||||
* are forwarded to the superclass.
|
||||
*
|
||||
* @param key the key to look for in the map.
|
||||
* @return true if the key exists in the map.
|
||||
* @throws NullPointerException if the specified key is null.
|
||||
*/
|
||||
public boolean containsKey(Object key)
|
||||
{
|
||||
if (key == null)
|
||||
throw new
|
||||
NullPointerException("This map does not support null keys.");
|
||||
if (!(key instanceof String))
|
||||
throw new
|
||||
ClassCastException("This map only allows queries using Strings.");
|
||||
return super.containsKey(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks queries using a null or non-<code>String</code> value.
|
||||
* All other queries are forwarded to the superclass.
|
||||
*
|
||||
* @param value the value to look for in the map.
|
||||
* @return true if the value exists in the map.
|
||||
* @throws NullPointerException if the specified value is null.
|
||||
*/
|
||||
public boolean containsValue(Object value)
|
||||
{
|
||||
if (value == null)
|
||||
throw new
|
||||
NullPointerException("This map does not support null values.");
|
||||
if (!(value instanceof String))
|
||||
throw new
|
||||
ClassCastException("This map only allows queries using Strings.");
|
||||
return super.containsValue(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set view of the map entries, with the same
|
||||
* provisions as for the underlying map.
|
||||
*
|
||||
* @return a set containing the map entries.
|
||||
*/
|
||||
public Set<Map.Entry<String,String>> entrySet()
|
||||
{
|
||||
if (entries == null)
|
||||
entries = super.entrySet();
|
||||
return entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks queries containing a null or non-<code>String</code> key.
|
||||
* All other queries are passed on to the superclass.
|
||||
*
|
||||
* @param key the key to retrieve the value for.
|
||||
* @return the value associated with the given key.
|
||||
* @throws NullPointerException if the specified key is null.
|
||||
* @throws ClassCastException if the specified key is not a String.
|
||||
*/
|
||||
public String get(Object key)
|
||||
{
|
||||
if (key == null)
|
||||
throw new
|
||||
NullPointerException("This map does not support null keys.");
|
||||
if (!(key instanceof String))
|
||||
throw new
|
||||
ClassCastException("This map only allows queries using Strings.");
|
||||
return super.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set view of the keys, with the same
|
||||
* provisions as for the underlying map.
|
||||
*
|
||||
* @return a set containing the keys.
|
||||
*/
|
||||
public Set<String> keySet()
|
||||
{
|
||||
if (keys == null)
|
||||
keys = new EnvironmentSet(super.keySet());
|
||||
return keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a key-value pair from the map. The queried key may not
|
||||
* be null or of a type other than a <code>String</code>.
|
||||
*
|
||||
* @param key the key of the entry to remove.
|
||||
* @return the removed value.
|
||||
* @throws NullPointerException if the specified key is null.
|
||||
* @throws ClassCastException if the specified key is not a String.
|
||||
*/
|
||||
public String remove(Object key)
|
||||
{
|
||||
if (key == null)
|
||||
throw new
|
||||
NullPointerException("This map does not support null keys.");
|
||||
if (!(key instanceof String))
|
||||
throw new
|
||||
ClassCastException("This map only allows queries using Strings.");
|
||||
return super.remove(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a collection view of the values, with the same
|
||||
* provisions as for the underlying map.
|
||||
*
|
||||
* @return a collection containing the values.
|
||||
*/
|
||||
public Collection<String> values()
|
||||
{
|
||||
if (values == null)
|
||||
values = new EnvironmentCollection(super.values());
|
||||
return values;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a specialised <code>Set</code>, providing
|
||||
* the necessary provisions for the collections used by the
|
||||
* environment variable map. Namely, it prevents
|
||||
* modifications and the use of queries with null
|
||||
* or non-<code>String</code> values.
|
||||
*
|
||||
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
|
||||
*/
|
||||
private static class EnvironmentSet
|
||||
extends EnvironmentCollection
|
||||
implements Set<String>
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructs a new environment set, which
|
||||
* wraps the elements of the supplied set.
|
||||
*
|
||||
* @param set the set to use as a base for
|
||||
* this set.
|
||||
*/
|
||||
public EnvironmentSet(Set<String> set)
|
||||
{
|
||||
super(set);
|
||||
}
|
||||
|
||||
/**
|
||||
* This simply calls the same method on the wrapped
|
||||
* collection.
|
||||
*
|
||||
* @param obj the object to compare with.
|
||||
* @return true if the two objects are equal.
|
||||
*/
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return c.equals(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* This simply calls the same method on the wrapped
|
||||
* collection.
|
||||
*
|
||||
* @return the hashcode of the collection.
|
||||
*/
|
||||
public int hashCode()
|
||||
{
|
||||
return c.hashCode();
|
||||
}
|
||||
|
||||
} // class EnvironmentSet<String>
|
||||
|
||||
} // class System
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
||||
|
||||
#ifndef __java_lang_Thread$State__
|
||||
#define __java_lang_Thread$State__
|
||||
|
||||
#pragma interface
|
||||
|
||||
#include <java/lang/Enum.h>
|
||||
#include <gcj/array.h>
|
||||
|
||||
|
||||
class java::lang::Thread$State : public ::java::lang::Enum
|
||||
{
|
||||
|
||||
Thread$State(::java::lang::String *, jint);
|
||||
public:
|
||||
static JArray< ::java::lang::Thread$State * > * values();
|
||||
static ::java::lang::Thread$State * valueOf(::java::lang::String *);
|
||||
static ::java::lang::Thread$State * BLOCKED;
|
||||
static ::java::lang::Thread$State * NEW;
|
||||
static ::java::lang::Thread$State * RUNNABLE;
|
||||
static ::java::lang::Thread$State * TERMINATED;
|
||||
static ::java::lang::Thread$State * TIMED_WAITING;
|
||||
static ::java::lang::Thread$State * WAITING;
|
||||
private:
|
||||
static JArray< ::java::lang::Thread$State * > * ENUM$VALUES;
|
||||
public:
|
||||
static ::java::lang::Class class$;
|
||||
};
|
||||
|
||||
#endif // __java_lang_Thread$State__
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user