From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- libjava/gnu/java/lang/ArrayHelper.h | 36 ++++ libjava/gnu/java/lang/CPStringBuilder.h | 100 +++++++++ libjava/gnu/java/lang/CharData.h | 45 ++++ libjava/gnu/java/lang/ClassHelper.h | 43 ++++ libjava/gnu/java/lang/InstrumentationImpl.h | 53 +++++ libjava/gnu/java/lang/MainThread.h | 50 +++++ libjava/gnu/java/lang/MainThread.java | 135 ++++++++++++ libjava/gnu/java/lang/VMCPStringBuilder.h | 39 ++++ libjava/gnu/java/lang/VMCPStringBuilder.java | 112 ++++++++++ libjava/gnu/java/lang/VMInstrumentationImpl.h | 40 ++++ libjava/gnu/java/lang/VMInstrumentationImpl.java | 119 +++++++++++ libjava/gnu/java/lang/management/BeanImpl.h | 69 ++++++ .../java/lang/management/ClassLoadingMXBeanImpl.h | 40 ++++ .../java/lang/management/CompilationMXBeanImpl.h | 42 ++++ .../lang/management/GarbageCollectorMXBeanImpl.h | 37 ++++ .../gnu/java/lang/management/MemoryMXBeanImpl.h | 70 ++++++ .../java/lang/management/MemoryManagerMXBeanImpl.h | 46 ++++ .../java/lang/management/MemoryPoolMXBeanImpl.h | 60 ++++++ .../lang/management/OperatingSystemMXBeanImpl.h | 40 ++++ .../gnu/java/lang/management/RuntimeMXBeanImpl.h | 58 +++++ .../gnu/java/lang/management/ThreadMXBeanImpl.h | 74 +++++++ .../lang/management/VMClassLoadingMXBeanImpl.h | 40 ++++ .../lang/management/VMClassLoadingMXBeanImpl.java | 89 ++++++++ .../java/lang/management/VMCompilationMXBeanImpl.h | 37 ++++ .../lang/management/VMCompilationMXBeanImpl.java | 66 ++++++ .../lang/management/VMGarbageCollectorMXBeanImpl.h | 38 ++++ .../management/VMGarbageCollectorMXBeanImpl.java | 80 +++++++ .../gnu/java/lang/management/VMMemoryMXBeanImpl.h | 41 ++++ .../java/lang/management/VMMemoryMXBeanImpl.java | 109 ++++++++++ .../lang/management/VMMemoryManagerMXBeanImpl.h | 40 ++++ .../lang/management/VMMemoryManagerMXBeanImpl.java | 95 +++++++++ .../java/lang/management/VMMemoryPoolMXBeanImpl.h | 51 +++++ .../lang/management/VMMemoryPoolMXBeanImpl.java | 195 +++++++++++++++++ .../lang/management/VMOperatingSystemMXBeanImpl.h | 37 ++++ .../management/VMOperatingSystemMXBeanImpl.java | 68 ++++++ .../gnu/java/lang/management/VMRuntimeMXBeanImpl.h | 43 ++++ .../java/lang/management/VMRuntimeMXBeanImpl.java | 109 ++++++++++ .../gnu/java/lang/management/VMThreadMXBeanImpl.h | 56 +++++ .../java/lang/management/VMThreadMXBeanImpl.java | 236 +++++++++++++++++++++ .../lang/management/natVMClassLoadingMXBeanImpl.cc | 49 +++++ .../lang/management/natVMCompilationMXBeanImpl.cc | 11 + .../management/natVMGarbageCollectorMXBeanImpl.cc | 18 ++ .../java/lang/management/natVMMemoryMXBeanImpl.cc | 47 ++++ .../management/natVMMemoryManagerMXBeanImpl.cc | 11 + .../lang/management/natVMMemoryPoolMXBeanImpl.cc | 111 ++++++++++ .../management/natVMOperatingSystemMXBeanImpl.cc | 18 ++ .../java/lang/management/natVMRuntimeMXBeanImpl.cc | 39 ++++ .../java/lang/management/natVMThreadMXBeanImpl.cc | 83 ++++++++ libjava/gnu/java/lang/natMainThread.cc | 65 ++++++ .../gnu/java/lang/reflect/ClassSignatureParser.h | 45 ++++ .../gnu/java/lang/reflect/FieldSignatureParser.h | 39 ++++ .../gnu/java/lang/reflect/GenericArrayTypeImpl.h | 44 ++++ .../gnu/java/lang/reflect/GenericSignatureParser.h | 62 ++++++ .../gnu/java/lang/reflect/MethodSignatureParser.h | 52 +++++ .../gnu/java/lang/reflect/ParameterizedTypeImpl.h | 52 +++++ libjava/gnu/java/lang/reflect/TypeImpl.h | 41 ++++ libjava/gnu/java/lang/reflect/TypeSignature.h | 44 ++++ libjava/gnu/java/lang/reflect/TypeVariableImpl.h | 50 +++++ .../gnu/java/lang/reflect/UnresolvedTypeVariable.h | 41 ++++ libjava/gnu/java/lang/reflect/WildcardTypeImpl.h | 48 +++++ 60 files changed, 3708 insertions(+) create mode 100644 libjava/gnu/java/lang/ArrayHelper.h create mode 100644 libjava/gnu/java/lang/CPStringBuilder.h create mode 100644 libjava/gnu/java/lang/CharData.h create mode 100644 libjava/gnu/java/lang/ClassHelper.h create mode 100644 libjava/gnu/java/lang/InstrumentationImpl.h create mode 100644 libjava/gnu/java/lang/MainThread.h create mode 100644 libjava/gnu/java/lang/MainThread.java create mode 100644 libjava/gnu/java/lang/VMCPStringBuilder.h create mode 100644 libjava/gnu/java/lang/VMCPStringBuilder.java create mode 100644 libjava/gnu/java/lang/VMInstrumentationImpl.h create mode 100644 libjava/gnu/java/lang/VMInstrumentationImpl.java create mode 100644 libjava/gnu/java/lang/management/BeanImpl.h create mode 100644 libjava/gnu/java/lang/management/ClassLoadingMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/CompilationMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/GarbageCollectorMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/MemoryMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/MemoryManagerMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/MemoryPoolMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/OperatingSystemMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/RuntimeMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/ThreadMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMClassLoadingMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMClassLoadingMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/VMCompilationMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMCompilationMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/VMMemoryMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMMemoryMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/VMRuntimeMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMRuntimeMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/VMThreadMXBeanImpl.h create mode 100644 libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java create mode 100644 libjava/gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/management/natVMCompilationMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/management/natVMMemoryMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/management/natVMThreadMXBeanImpl.cc create mode 100644 libjava/gnu/java/lang/natMainThread.cc create mode 100644 libjava/gnu/java/lang/reflect/ClassSignatureParser.h create mode 100644 libjava/gnu/java/lang/reflect/FieldSignatureParser.h create mode 100644 libjava/gnu/java/lang/reflect/GenericArrayTypeImpl.h create mode 100644 libjava/gnu/java/lang/reflect/GenericSignatureParser.h create mode 100644 libjava/gnu/java/lang/reflect/MethodSignatureParser.h create mode 100644 libjava/gnu/java/lang/reflect/ParameterizedTypeImpl.h create mode 100644 libjava/gnu/java/lang/reflect/TypeImpl.h create mode 100644 libjava/gnu/java/lang/reflect/TypeSignature.h create mode 100644 libjava/gnu/java/lang/reflect/TypeVariableImpl.h create mode 100644 libjava/gnu/java/lang/reflect/UnresolvedTypeVariable.h create mode 100644 libjava/gnu/java/lang/reflect/WildcardTypeImpl.h (limited to 'libjava/gnu/java/lang') diff --git a/libjava/gnu/java/lang/ArrayHelper.h b/libjava/gnu/java/lang/ArrayHelper.h new file mode 100644 index 000000000..93b7578f5 --- /dev/null +++ b/libjava/gnu/java/lang/ArrayHelper.h @@ -0,0 +1,36 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_ArrayHelper__ +#define __gnu_java_lang_ArrayHelper__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class ArrayHelper; + } + } + } +} + +class gnu::java::lang::ArrayHelper : public ::java::lang::Object +{ + +public: + ArrayHelper(); + static jboolean contains(JArray< ::java::lang::Object * > *, ::java::lang::Object *); + static jint indexOf(JArray< ::java::lang::Object * > *, ::java::lang::Object *); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_ArrayHelper__ diff --git a/libjava/gnu/java/lang/CPStringBuilder.h b/libjava/gnu/java/lang/CPStringBuilder.h new file mode 100644 index 000000000..5b03bf3a7 --- /dev/null +++ b/libjava/gnu/java/lang/CPStringBuilder.h @@ -0,0 +1,100 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_CPStringBuilder__ +#define __gnu_java_lang_CPStringBuilder__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class CPStringBuilder; + } + } + } +} + +class gnu::java::lang::CPStringBuilder : public ::java::lang::Object +{ + +public: + CPStringBuilder(); + CPStringBuilder(jint); + CPStringBuilder(::java::lang::String *); + CPStringBuilder(::java::lang::StringBuffer *); + CPStringBuilder(::java::lang::StringBuilder *); + CPStringBuilder(::java::lang::CharSequence *); + void setLength(jint); + jchar charAt(jint); + jint codePointAt(jint); + jint codePointBefore(jint); + void getChars(jint, jint, JArray< jchar > *, jint); + void setCharAt(jint, jchar); + ::gnu::java::lang::CPStringBuilder * append(::java::lang::Object *); + ::gnu::java::lang::CPStringBuilder * append(::java::lang::String *); + ::gnu::java::lang::CPStringBuilder * append(::java::lang::StringBuffer *); + ::gnu::java::lang::CPStringBuilder * append(JArray< jchar > *); + ::gnu::java::lang::CPStringBuilder * append(JArray< jchar > *, jint, jint); + ::gnu::java::lang::CPStringBuilder * append(jboolean); + ::gnu::java::lang::CPStringBuilder * CPStringBuilder$append(jchar); + ::gnu::java::lang::CPStringBuilder * CPStringBuilder$append(::java::lang::CharSequence *); + ::gnu::java::lang::CPStringBuilder * CPStringBuilder$append(::java::lang::CharSequence *, jint, jint); + ::gnu::java::lang::CPStringBuilder * append(jint); + ::gnu::java::lang::CPStringBuilder * append(jlong); + ::gnu::java::lang::CPStringBuilder * append(jfloat); + ::gnu::java::lang::CPStringBuilder * append(jdouble); + ::gnu::java::lang::CPStringBuilder * appendCodePoint(jint); + ::gnu::java::lang::CPStringBuilder * delete$(jint, jint); + ::gnu::java::lang::CPStringBuilder * deleteCharAt(jint); + ::gnu::java::lang::CPStringBuilder * replace(jint, jint, ::java::lang::String *); + ::gnu::java::lang::CPStringBuilder * insert(jint, JArray< jchar > *, jint, jint); + ::gnu::java::lang::CPStringBuilder * insert(jint, ::java::lang::Object *); + ::gnu::java::lang::CPStringBuilder * insert(jint, ::java::lang::String *); + ::gnu::java::lang::CPStringBuilder * insert(jint, ::java::lang::CharSequence *); + ::gnu::java::lang::CPStringBuilder * insert(jint, ::java::lang::CharSequence *, jint, jint); + ::gnu::java::lang::CPStringBuilder * insert(jint, JArray< jchar > *); + ::gnu::java::lang::CPStringBuilder * insert(jint, jboolean); + ::gnu::java::lang::CPStringBuilder * insert(jint, jchar); + ::gnu::java::lang::CPStringBuilder * insert(jint, jint); + ::gnu::java::lang::CPStringBuilder * insert(jint, jlong); + ::gnu::java::lang::CPStringBuilder * insert(jint, jfloat); + ::gnu::java::lang::CPStringBuilder * 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); + ::gnu::java::lang::CPStringBuilder * reverse(); + void trimToSize(); + jint codePointCount(jint, jint); + jint offsetByCodePoints(jint, jint); + void ensureCapacity(jint); +private: + void allocateArray(jint); +public: + jint length(); + ::java::lang::CharSequence * subSequence(jint, jint); + ::java::lang::String * substring(jint); + ::java::lang::String * substring(jint, jint); + ::java::lang::String * toString(); + ::java::lang::Appendable * append(::java::lang::CharSequence *, jint, jint); + ::java::lang::Appendable * append(::java::lang::CharSequence *); + ::java::lang::Appendable * append(jchar); +private: + jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) count; + JArray< jchar > * value; + jboolean allocated; + static jint DEFAULT_CAPACITY; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_CPStringBuilder__ diff --git a/libjava/gnu/java/lang/CharData.h b/libjava/gnu/java/lang/CharData.h new file mode 100644 index 000000000..0a16c891e --- /dev/null +++ b/libjava/gnu/java/lang/CharData.h @@ -0,0 +1,45 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_CharData__ +#define __gnu_java_lang_CharData__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class CharData; + } + } + } +} + +class gnu::java::lang::CharData : public ::java::lang::Object +{ + +public: + static ::java::lang::String * SOURCE; + static JArray< jint > * SHIFT; + static JArray< ::java::lang::String * > * BLOCKS; + static JArray< jint > * LARGENUMS; + static JArray< ::java::lang::String * > * DATA; + static JArray< ::java::lang::String * > * NUM_VALUE; + static JArray< ::java::lang::String * > * UPPER; + static JArray< ::java::lang::String * > * LOWER; + static JArray< ::java::lang::String * > * DIRECTION; + static ::java::lang::String * TITLE; + static ::java::lang::String * UPPER_SPECIAL; + static ::java::lang::String * UPPER_EXPAND; + static ::java::lang::Class class$; +} __attribute__ ((java_interface)); + +#endif // __gnu_java_lang_CharData__ diff --git a/libjava/gnu/java/lang/ClassHelper.h b/libjava/gnu/java/lang/ClassHelper.h new file mode 100644 index 000000000..d42070e9a --- /dev/null +++ b/libjava/gnu/java/lang/ClassHelper.h @@ -0,0 +1,43 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_ClassHelper__ +#define __gnu_java_lang_ClassHelper__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class ClassHelper; + } + } + } +} + +class gnu::java::lang::ClassHelper : public ::java::lang::Object +{ + +public: + ClassHelper(); + static ::java::lang::String * getTruncatedClassName(::java::lang::Class *); + static ::java::lang::String * getTruncatedName(::java::lang::String *); + static ::java::lang::String * getUserName(::java::lang::Class *); + static JArray< ::java::lang::reflect::Method * > * getAllMethods(::java::lang::Class *); + static JArray< ::java::lang::reflect::Field * > * getAllFields(::java::lang::Class *); +private: + static ::java::util::Map * allMethods; + static ::java::util::Map * allFields; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_ClassHelper__ diff --git a/libjava/gnu/java/lang/InstrumentationImpl.h b/libjava/gnu/java/lang/InstrumentationImpl.h new file mode 100644 index 000000000..675626e9b --- /dev/null +++ b/libjava/gnu/java/lang/InstrumentationImpl.h @@ -0,0 +1,53 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_InstrumentationImpl__ +#define __gnu_java_lang_InstrumentationImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class InstrumentationImpl; + } + } + } + namespace java + { + namespace security + { + class ProtectionDomain; + } + } +} + +class gnu::java::lang::InstrumentationImpl : public ::java::lang::Object +{ + +public: // actually package-private + InstrumentationImpl(); +public: + void addTransformer(::java::lang::instrument::ClassFileTransformer *); + jboolean removeTransformer(::java::lang::instrument::ClassFileTransformer *); + jboolean isRedefineClassesSupported(); + void redefineClasses(JArray< ::java::lang::instrument::ClassDefinition * > *); + JArray< ::java::lang::Class * > * getAllLoadedClasses(); + JArray< ::java::lang::Class * > * getInitiatedClasses(::java::lang::ClassLoader *); + jlong getObjectSize(::java::lang::Object *); + JArray< jbyte > * callTransformers(::java::lang::ClassLoader *, ::java::lang::String *, ::java::lang::Class *, ::java::security::ProtectionDomain *, JArray< jbyte > *); +private: + ::java::util::ArrayList * __attribute__((aligned(__alignof__( ::java::lang::Object)))) transformers; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_InstrumentationImpl__ diff --git a/libjava/gnu/java/lang/MainThread.h b/libjava/gnu/java/lang/MainThread.h new file mode 100644 index 000000000..8c94dd584 --- /dev/null +++ b/libjava/gnu/java/lang/MainThread.h @@ -0,0 +1,50 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_MainThread__ +#define __gnu_java_lang_MainThread__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class MainThread; + } + } + } +} + +class gnu::java::lang::MainThread : public ::java::lang::Thread +{ + +public: + MainThread(::java::lang::Class *, JArray< ::java::lang::String * > *); + MainThread(::java::lang::String *, JArray< ::java::lang::String * > *, jboolean); + void run(); +private: + ::java::lang::String * getMain(::java::lang::String *); + void call_main(); +public: // actually package-private + static ::java::lang::Class * Kcert; + static ::java::lang::Class * Kfile; + static ::java::lang::Class * Khttp; + static ::java::lang::Class * Kjar; +private: + ::java::lang::Class * __attribute__((aligned(__alignof__( ::java::lang::Thread)))) klass; + ::java::lang::String * klass_name; + JArray< ::java::lang::String * > * args; + jboolean is_jar; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_MainThread__ diff --git a/libjava/gnu/java/lang/MainThread.java b/libjava/gnu/java/lang/MainThread.java new file mode 100644 index 000000000..a33445c21 --- /dev/null +++ b/libjava/gnu/java/lang/MainThread.java @@ -0,0 +1,135 @@ +/* gnu.java.lang.MainThread + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2008 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.lang; + +import java.io.File; +import java.util.jar.Attributes; +import java.util.jar.JarFile; + +/** + * MainThread is a Thread which uses the main() method of some class. + * + * @author John Keiser + * @author Tom Tromey (tromey@redhat.com) + */ +final class MainThread extends Thread +{ + // If the user links statically then we need to ensure that these + // classes are linked in. Otherwise bootstrapping fails. These + // classes are only referred to via Class.forName(), so we add an + // explicit mention of them here. + static final Class Kcert = java.security.cert.Certificate.class; + static final Class Kfile = gnu.java.net.protocol.file.Handler.class; + static final Class Khttp = gnu.java.net.protocol.http.Handler.class; + static final Class Kjar = gnu.java.net.protocol.jar.Handler.class; + + // Private data. + private Class klass; + private String klass_name; + private String[] args; + private boolean is_jar; + + public MainThread(Class k, String[] args) + { + super(null, null, "main"); + klass = k; + this.args = args; + } + + public MainThread(String classname, String[] args, boolean is_jar) + { + super (null, null, "main"); + klass_name = classname; + this.args = args; + this.is_jar = is_jar; + } + + public void run() + { + if (is_jar) + klass_name = getMain(klass_name); + + if (klass == null) + { + try + { + ClassLoader cl = ClassLoader.getSystemClassLoader(); + // Permit main class name to be specified in file-system format. + klass_name = klass_name.replace(File.separatorChar, '.'); + klass = cl.loadClass(klass_name); + } + catch (ClassNotFoundException x) + { + NoClassDefFoundError ncdfe = new NoClassDefFoundError(klass_name); + ncdfe.initCause(x); + throw ncdfe; + } + } + + call_main(); + } + + private String getMain(String name) + { + String mainName = null; + try + { + JarFile j = new JarFile(name); + Attributes a = j.getManifest().getMainAttributes(); + mainName = a.getValue(Attributes.Name.MAIN_CLASS); + } + catch (Exception e) + { + // Ignore. + } + + if (mainName == null) + { + System.err.println("Failed to load Main-Class manifest attribute from " + + name); + System.exit(1); + } + return mainName; + } + + // Note: this function name is known to the stack tracing code. + // You shouldn't change this without also updating stacktrace.cc. + private native void call_main(); +} diff --git a/libjava/gnu/java/lang/VMCPStringBuilder.h b/libjava/gnu/java/lang/VMCPStringBuilder.h new file mode 100644 index 000000000..f8c2eb309 --- /dev/null +++ b/libjava/gnu/java/lang/VMCPStringBuilder.h @@ -0,0 +1,39 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_VMCPStringBuilder__ +#define __gnu_java_lang_VMCPStringBuilder__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class VMCPStringBuilder; + } + } + } +} + +class gnu::java::lang::VMCPStringBuilder : public ::java::lang::Object +{ + +public: // actually package-private + VMCPStringBuilder(); +public: + static ::java::lang::String * toString(JArray< jchar > *, jint, jint); +private: + static ::java::lang::reflect::Constructor * cons; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_VMCPStringBuilder__ diff --git a/libjava/gnu/java/lang/VMCPStringBuilder.java b/libjava/gnu/java/lang/VMCPStringBuilder.java new file mode 100644 index 000000000..8e137cd3f --- /dev/null +++ b/libjava/gnu/java/lang/VMCPStringBuilder.java @@ -0,0 +1,112 @@ +/* VMCPStringBuilder.java -- Growable strings without locking or copying + Copyright (C) 2008 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +/** + * This class provides VM support for CPStringBuilder + * by allowing the package-private constructor + * of java.lang.String to be invoked. The default + * implementation uses reflection. VMs may replace + * this class with a more efficient version. + */ +final class VMCPStringBuilder +{ + + /** + * The package-private constructor for String objects without copying. + */ + private static final Constructor cons; + + static + { + try + { + cons = String.class.getDeclaredConstructor(new Class[] { char[].class, + Integer.TYPE, + Integer.TYPE, + Boolean.TYPE }); + cons.setAccessible(true); + } + catch (NoSuchMethodException e) + { + throw (Error) + new InternalError("Could not get no-copy String constructor").initCause(e); + } + } + + /** + * Convert this StringBuilder to a String. The + * String is composed of the characters currently in this StringBuilder. Note + * that the result is not a copy, so the builder will allocate a new array + * if a further write operation is attempted. + * + * @param value the buffered characters. + * @param startIndex the index at which to start taking characters from the buffer. + * @param count the number of characters used in the buffer. + * @return the characters in this StringBuilder + */ + public static String toString(char[] value, int startIndex, int count) + { + try + { + return (String) + cons.newInstance(new Object[] { value, Integer.valueOf(startIndex), + Integer.valueOf(count), + Boolean.valueOf(true) }); + } + catch (InstantiationException e) + { + throw (Error) + new InternalError("Could not instantiate no-copy String constructor").initCause(e); + } + catch (IllegalAccessException e) + { + throw (Error) + new InternalError("Could not access no-copy String constructor").initCause(e); + } + catch (InvocationTargetException e) + { + throw (Error) + new InternalError("Error calling no-copy String constructor").initCause(e); + } + } + +} diff --git a/libjava/gnu/java/lang/VMInstrumentationImpl.h b/libjava/gnu/java/lang/VMInstrumentationImpl.h new file mode 100644 index 000000000..1b647a3ec --- /dev/null +++ b/libjava/gnu/java/lang/VMInstrumentationImpl.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_VMInstrumentationImpl__ +#define __gnu_java_lang_VMInstrumentationImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class VMInstrumentationImpl; + } + } + } +} + +class gnu::java::lang::VMInstrumentationImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMInstrumentationImpl(); + static jboolean isRedefineClassesSupported(); + static void redefineClasses(::java::lang::instrument::Instrumentation *, JArray< ::java::lang::instrument::ClassDefinition * > *); + static JArray< ::java::lang::Class * > * getAllLoadedClasses(); + static JArray< ::java::lang::Class * > * getInitiatedClasses(::java::lang::ClassLoader *); + static jlong getObjectSize(::java::lang::Object *); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_VMInstrumentationImpl__ diff --git a/libjava/gnu/java/lang/VMInstrumentationImpl.java b/libjava/gnu/java/lang/VMInstrumentationImpl.java new file mode 100644 index 000000000..4ffff839c --- /dev/null +++ b/libjava/gnu/java/lang/VMInstrumentationImpl.java @@ -0,0 +1,119 @@ +/* VMInstrumentationImpl.java -- interface for the GNU implementation + of InstrumentationImpl + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.lang; + +import java.lang.instrument.ClassDefinition; +import java.lang.instrument.Instrumentation; + +/** + * @author Nicolas Geoffray (nicolas.geoffray@menlina.com) + * @since 1.5 + */ +final class VMInstrumentationImpl +{ + + /** + * Returns if the current JVM supports class redefinition + * + * @return true if the current JVM supports class redefinition + */ + static boolean isRedefineClassesSupported() { return false; } + + /** + * Redefines classes given as parameters. The method has to call + * the callTransformers from InstrumentationImpl + * + * @param inst an instrumentation object + * @param definitions an array of bytecode<->class correspondance + * + * @throws ClassNotFoundException if a class cannot be found + * @throws UnmodifiableClassException if a class cannot be modified + * @throws UnsupportedOperationException if the JVM does not support + * redefinition or the redefinition made unsupported changes + * @throws ClassFormatError if a class file is not valid + * @throws NoClassDefFoundError if a class name is not equal to the name + * in the class file specified + * @throws UnsupportedClassVersionError if the class file version numbers + * are unsupported + * @throws ClassCircularityError if circularity occured with the new + * classes + * @throws LinkageError if a linkage error occurs + */ + static void redefineClasses(Instrumentation inst, + ClassDefinition[] definitions) + { + } + + /** + * Get all the classes loaded by the JVM. + * + * @return an array containing all the classes loaded by the JVM. The array + * is empty if no class is loaded. + */ + static Class[] getAllLoadedClasses() + { + return new Class[0]; + } + + /** + * Get all the classes loaded by a given class loader + * + * @param loader the loader + * + * @return an array containing all the classes loaded by the given loader. + * The array is empty if no class was loaded by the loader. + */ + static Class[] getInitiatedClasses(ClassLoader loader) + { + return new Class[0]; + } + + + /** + * Get the size of an object. The object is not null + * + * @param objectToSize the object + * @return the size of the object + */ + static long getObjectSize(Object objectToSize) + { + return 0; + } +} diff --git a/libjava/gnu/java/lang/management/BeanImpl.h b/libjava/gnu/java/lang/management/BeanImpl.h new file mode 100644 index 000000000..463d617f3 --- /dev/null +++ b/libjava/gnu/java/lang/management/BeanImpl.h @@ -0,0 +1,69 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_BeanImpl__ +#define __gnu_java_lang_management_BeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class BeanImpl; + } + } + } + } + namespace javax + { + namespace management + { + class MBeanConstructorInfo; + class MBeanInfo; + class MBeanOperationInfo; + class MBeanParameterInfo; + namespace openmbean + { + class OpenMBeanInfo; + class OpenMBeanParameterInfo; + } + } + } +} + +class gnu::java::lang::management::BeanImpl : public ::javax::management::StandardMBean +{ + +public: // actually protected + BeanImpl(::java::lang::Class *); + virtual void cacheMBeanInfo(::javax::management::MBeanInfo *); + virtual void checkMonitorPermissions(); + virtual void checkControlPermissions(); +public: + virtual ::java::lang::Object * getAttribute(::java::lang::String *); +public: // actually protected + virtual ::javax::management::MBeanInfo * getCachedMBeanInfo(); + virtual ::java::lang::String * getDescription(::javax::management::MBeanConstructorInfo *, ::javax::management::MBeanParameterInfo *, jint); + virtual ::java::lang::String * getDescription(::javax::management::MBeanOperationInfo *, ::javax::management::MBeanParameterInfo *, jint); + virtual ::java::lang::String * getParameterName(::javax::management::MBeanConstructorInfo *, ::javax::management::MBeanParameterInfo *, jint); + virtual ::java::lang::String * getParameterName(::javax::management::MBeanOperationInfo *, ::javax::management::MBeanParameterInfo *, jint); +public: + virtual ::javax::management::MBeanInfo * getMBeanInfo(); +private: + JArray< ::javax::management::openmbean::OpenMBeanParameterInfo * > * translateSignature(JArray< ::javax::management::MBeanParameterInfo * > *); + ::javax::management::openmbean::OpenMBeanInfo * __attribute__((aligned(__alignof__( ::javax::management::StandardMBean)))) openInfo; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_BeanImpl__ diff --git a/libjava/gnu/java/lang/management/ClassLoadingMXBeanImpl.h b/libjava/gnu/java/lang/management/ClassLoadingMXBeanImpl.h new file mode 100644 index 000000000..c03db2324 --- /dev/null +++ b/libjava/gnu/java/lang/management/ClassLoadingMXBeanImpl.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_ClassLoadingMXBeanImpl__ +#define __gnu_java_lang_management_ClassLoadingMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class ClassLoadingMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::ClassLoadingMXBeanImpl : public ::gnu::java::lang::management::BeanImpl +{ + +public: + ClassLoadingMXBeanImpl(); + jint getLoadedClassCount(); + jlong getTotalLoadedClassCount(); + jlong getUnloadedClassCount(); + jboolean isVerbose(); + void setVerbose(jboolean); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_ClassLoadingMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/CompilationMXBeanImpl.h b/libjava/gnu/java/lang/management/CompilationMXBeanImpl.h new file mode 100644 index 000000000..c11d3fb83 --- /dev/null +++ b/libjava/gnu/java/lang/management/CompilationMXBeanImpl.h @@ -0,0 +1,42 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_CompilationMXBeanImpl__ +#define __gnu_java_lang_management_CompilationMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class CompilationMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::CompilationMXBeanImpl : public ::gnu::java::lang::management::BeanImpl +{ + +public: + CompilationMXBeanImpl(); + ::java::lang::String * getName(); + jboolean isCompilationTimeMonitoringSupported(); + jlong getTotalCompilationTime(); +private: + static ::java::lang::String * COMPILER_NAME; + static ::java::lang::String * COMPILATION_TIME_SUPPORT; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_CompilationMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/GarbageCollectorMXBeanImpl.h b/libjava/gnu/java/lang/management/GarbageCollectorMXBeanImpl.h new file mode 100644 index 000000000..cfefdb653 --- /dev/null +++ b/libjava/gnu/java/lang/management/GarbageCollectorMXBeanImpl.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_GarbageCollectorMXBeanImpl__ +#define __gnu_java_lang_management_GarbageCollectorMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class GarbageCollectorMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::GarbageCollectorMXBeanImpl : public ::gnu::java::lang::management::MemoryManagerMXBeanImpl +{ + +public: + GarbageCollectorMXBeanImpl(::java::lang::String *); + jlong getCollectionCount(); + jlong getCollectionTime(); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_GarbageCollectorMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/MemoryMXBeanImpl.h b/libjava/gnu/java/lang/management/MemoryMXBeanImpl.h new file mode 100644 index 000000000..3c87a0f35 --- /dev/null +++ b/libjava/gnu/java/lang/management/MemoryMXBeanImpl.h @@ -0,0 +1,70 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_MemoryMXBeanImpl__ +#define __gnu_java_lang_management_MemoryMXBeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class MemoryMXBeanImpl; + } + } + } + } + namespace javax + { + namespace management + { + class MBeanNotificationInfo; + class NotificationFilter; + class NotificationListener; + namespace openmbean + { + class CompositeType; + } + } + } +} + +class gnu::java::lang::management::MemoryMXBeanImpl : public ::gnu::java::lang::management::BeanImpl +{ + +public: + MemoryMXBeanImpl(); + void gc(); + ::java::lang::management::MemoryUsage * getHeapMemoryUsage(); + ::java::lang::management::MemoryUsage * getNonHeapMemoryUsage(); + jint getObjectPendingFinalizationCount(); + jboolean isVerbose(); + void setVerbose(jboolean); + void addNotificationListener(::javax::management::NotificationListener *, ::javax::management::NotificationFilter *, ::java::lang::Object *); + JArray< ::javax::management::MBeanNotificationInfo * > * getNotificationInfo(); + void removeNotificationListener(::javax::management::NotificationListener *); + void removeNotificationListener(::javax::management::NotificationListener *, ::javax::management::NotificationFilter *, ::java::lang::Object *); +public: // actually package-private + void fireNotification(::java::lang::String *, ::java::lang::String *, jlong, jlong, jlong, jlong, jlong); + void fireThresholdExceededNotification(::java::lang::String *, jlong, jlong, jlong, jlong, jlong); + void fireCollectionThresholdExceededNotification(::java::lang::String *, jlong, jlong, jlong, jlong, jlong); +private: + ::java::util::List * __attribute__((aligned(__alignof__( ::gnu::java::lang::management::BeanImpl)))) listeners; + jlong notificationCount; +public: + static ::javax::management::openmbean::CompositeType * notifType; + static ::javax::management::openmbean::CompositeType * usageType; + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_MemoryMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/MemoryManagerMXBeanImpl.h b/libjava/gnu/java/lang/management/MemoryManagerMXBeanImpl.h new file mode 100644 index 000000000..2ddbf70ea --- /dev/null +++ b/libjava/gnu/java/lang/management/MemoryManagerMXBeanImpl.h @@ -0,0 +1,46 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_MemoryManagerMXBeanImpl__ +#define __gnu_java_lang_management_MemoryManagerMXBeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class MemoryManagerMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::MemoryManagerMXBeanImpl : public ::gnu::java::lang::management::BeanImpl +{ + +public: + MemoryManagerMXBeanImpl(::java::lang::String *); +public: // actually protected + MemoryManagerMXBeanImpl(::java::lang::String *, ::java::lang::Class *); +public: + virtual JArray< ::java::lang::String * > * getMemoryPoolNames(); + virtual ::java::lang::String * getName(); + virtual jboolean isValid(); +public: // actually protected + ::java::lang::String * __attribute__((aligned(__alignof__( ::gnu::java::lang::management::BeanImpl)))) name; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_MemoryManagerMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/MemoryPoolMXBeanImpl.h b/libjava/gnu/java/lang/management/MemoryPoolMXBeanImpl.h new file mode 100644 index 000000000..ff3734d28 --- /dev/null +++ b/libjava/gnu/java/lang/management/MemoryPoolMXBeanImpl.h @@ -0,0 +1,60 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_MemoryPoolMXBeanImpl__ +#define __gnu_java_lang_management_MemoryPoolMXBeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class MemoryPoolMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::MemoryPoolMXBeanImpl : public ::gnu::java::lang::management::BeanImpl +{ + +public: + MemoryPoolMXBeanImpl(::java::lang::String *); + ::java::lang::management::MemoryUsage * getCollectionUsage(); + jlong getCollectionUsageThreshold(); + jlong getCollectionUsageThresholdCount(); + JArray< ::java::lang::String * > * getMemoryManagerNames(); + ::java::lang::String * getName(); + ::java::lang::management::MemoryUsage * getPeakUsage(); + ::java::lang::management::MemoryType * getType(); + ::java::lang::management::MemoryUsage * getUsage(); + jlong getUsageThreshold(); + jlong getUsageThresholdCount(); + jboolean isCollectionUsageThresholdExceeded(); + jboolean isCollectionUsageThresholdSupported(); + jboolean isUsageThresholdExceeded(); + jboolean isUsageThresholdSupported(); + jboolean isValid(); + void resetPeakUsage(); + void setCollectionUsageThreshold(jlong); + void setUsageThreshold(jlong); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::gnu::java::lang::management::BeanImpl)))) name; + static ::java::lang::String * COLLECTION_USAGE_THRESHOLD; + static ::java::lang::String * USAGE_THRESHOLD; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_MemoryPoolMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/OperatingSystemMXBeanImpl.h b/libjava/gnu/java/lang/management/OperatingSystemMXBeanImpl.h new file mode 100644 index 000000000..af79980b2 --- /dev/null +++ b/libjava/gnu/java/lang/management/OperatingSystemMXBeanImpl.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_OperatingSystemMXBeanImpl__ +#define __gnu_java_lang_management_OperatingSystemMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class OperatingSystemMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::OperatingSystemMXBeanImpl : public ::gnu::java::lang::management::BeanImpl +{ + +public: + OperatingSystemMXBeanImpl(); + ::java::lang::String * getArch(); + jint getAvailableProcessors(); + ::java::lang::String * getName(); + jdouble getSystemLoadAverage(); + ::java::lang::String * getVersion(); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_OperatingSystemMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/RuntimeMXBeanImpl.h b/libjava/gnu/java/lang/management/RuntimeMXBeanImpl.h new file mode 100644 index 000000000..f46f6df2c --- /dev/null +++ b/libjava/gnu/java/lang/management/RuntimeMXBeanImpl.h @@ -0,0 +1,58 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_RuntimeMXBeanImpl__ +#define __gnu_java_lang_management_RuntimeMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class RuntimeMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::RuntimeMXBeanImpl : public ::gnu::java::lang::management::BeanImpl +{ + +public: + RuntimeMXBeanImpl(); + ::java::lang::String * getBootClassPath(); + ::java::lang::String * getClassPath(); + ::java::util::List * getInputArguments(); + ::java::lang::String * getLibraryPath(); + ::java::lang::String * getManagementSpecVersion(); + ::java::lang::String * getName(); + ::java::lang::String * getSpecName(); + ::java::lang::String * getSpecVendor(); + ::java::lang::String * getSpecVersion(); + jlong getStartTime(); + ::java::util::Map * getSystemProperties(); + jlong getUptime(); + ::java::lang::String * getVmName(); + ::java::lang::String * getVmVendor(); + ::java::lang::String * getVmVersion(); + jboolean isBootClassPathSupported(); +private: + static ::java::lang::String * SUN_BOOT_CLASS_PATH; + static ::java::lang::String * JAVA_BOOT_CLASS_PATH; + jlong __attribute__((aligned(__alignof__( ::gnu::java::lang::management::BeanImpl)))) startTime; + ::java::lang::String * bootClassPath; + jboolean bootClassPathSupported; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_RuntimeMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/ThreadMXBeanImpl.h b/libjava/gnu/java/lang/management/ThreadMXBeanImpl.h new file mode 100644 index 000000000..6127548f5 --- /dev/null +++ b/libjava/gnu/java/lang/management/ThreadMXBeanImpl.h @@ -0,0 +1,74 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_ThreadMXBeanImpl__ +#define __gnu_java_lang_management_ThreadMXBeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class ThreadMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::ThreadMXBeanImpl : public ::gnu::java::lang::management::BeanImpl +{ + +public: + ThreadMXBeanImpl(); + JArray< ::java::lang::management::ThreadInfo * > * dumpAllThreads(jboolean, jboolean); + JArray< jlong > * findDeadlockedThreads(); + JArray< jlong > * findMonitorDeadlockedThreads(); + JArray< jlong > * getAllThreadIds(); + jlong getCurrentThreadCpuTime(); + jlong getCurrentThreadUserTime(); + jint getDaemonThreadCount(); + jint getPeakThreadCount(); + jint getThreadCount(); + jlong getThreadCpuTime(jlong); + ::java::lang::management::ThreadInfo * getThreadInfo(jlong); + JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *); + ::java::lang::management::ThreadInfo * getThreadInfo(jlong, jint); + JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *, jint); + JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *, jboolean, jboolean); + jlong getThreadUserTime(jlong); + jlong getTotalStartedThreadCount(); + jboolean isCurrentThreadCpuTimeSupported(); + jboolean isObjectMonitorUsageSupported(); + jboolean isSynchronizerUsageSupported(); + jboolean isThreadContentionMonitoringEnabled(); + jboolean isThreadContentionMonitoringSupported(); + jboolean isThreadCpuTimeEnabled(); + jboolean isThreadCpuTimeSupported(); + void resetPeakThreadCount(); + void setThreadContentionMonitoringEnabled(jboolean); + void setThreadCpuTimeEnabled(jboolean); +private: + static ::java::lang::String * CURRENT_THREAD_TIME_SUPPORT; + static ::java::lang::String * THREAD_TIME_SUPPORT; + static ::java::lang::String * CONTENTION_SUPPORT; + static ::java::lang::String * TIME_ENABLED; + static ::java::lang::String * MONITOR_SUPPORT; + static ::java::lang::String * SYNCHRONIZER_SUPPORT; + jboolean __attribute__((aligned(__alignof__( ::gnu::java::lang::management::BeanImpl)))) timeEnabled; + jboolean contentionEnabled; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_ThreadMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMClassLoadingMXBeanImpl.h b/libjava/gnu/java/lang/management/VMClassLoadingMXBeanImpl.h new file mode 100644 index 000000000..b38100446 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMClassLoadingMXBeanImpl.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMClassLoadingMXBeanImpl__ +#define __gnu_java_lang_management_VMClassLoadingMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMClassLoadingMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMClassLoadingMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMClassLoadingMXBeanImpl(); + static jint getLoadedClassCount(); + static jlong getUnloadedClassCount(); + static jboolean isVerbose(); + static void setVerbose(jboolean); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMClassLoadingMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMClassLoadingMXBeanImpl.java b/libjava/gnu/java/lang/management/VMClassLoadingMXBeanImpl.java new file mode 100644 index 000000000..c1c7d13dd --- /dev/null +++ b/libjava/gnu/java/lang/management/VMClassLoadingMXBeanImpl.java @@ -0,0 +1,89 @@ +/* VMClassLoadingMXBeanImpl.java - VM impl. of a class loading bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +/** + * Provides access to information about the class loading + * behaviour of the current invocation of the virtual + * machine. Instances of this bean are obtained by calling + * {@link ManagementFactory#getClassLoadingMXBean()}. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.5 + */ +final class VMClassLoadingMXBeanImpl +{ + + /** + * Returns the number of classes currently loaded by + * the virtual machine. + * + * @return the number of loaded classes. + */ + static native int getLoadedClassCount(); + + /** + * Returns the number of classes that have been unloaded + * by the virtual machine since it was started. + * + * @return the number of unloaded classes. + */ + static native long getUnloadedClassCount(); + + /** + * Returns true if the virtual machine will emit additional + * information when classes are loaded and unloaded. The + * format of the output is left up to the virtual machine. + * + * @return true if verbose class loading output is on. + */ + static native boolean isVerbose(); + + /** + * Turns on or off the emission of additional information + * when classes are loaded and unloaded. The format of the + * output is left up to the virtual machine. This method + * may be called by multiple threads concurrently, but there + * is only one global setting of verbosity that is affected. + * + * @param verbose the new setting for verbose class loading + * output. + */ + static native void setVerbose(boolean verbose); + +} diff --git a/libjava/gnu/java/lang/management/VMCompilationMXBeanImpl.h b/libjava/gnu/java/lang/management/VMCompilationMXBeanImpl.h new file mode 100644 index 000000000..31967e134 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMCompilationMXBeanImpl.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMCompilationMXBeanImpl__ +#define __gnu_java_lang_management_VMCompilationMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMCompilationMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMCompilationMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMCompilationMXBeanImpl(); + static jlong getTotalCompilationTime(); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMCompilationMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMCompilationMXBeanImpl.java b/libjava/gnu/java/lang/management/VMCompilationMXBeanImpl.java new file mode 100644 index 000000000..b9b5bbcef --- /dev/null +++ b/libjava/gnu/java/lang/management/VMCompilationMXBeanImpl.java @@ -0,0 +1,66 @@ +/* VMCompilationMXBeanImpl.java - VM implementation of a compilation bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +/** + * Provides access to information about the JIT + * compiler of the virtual machine, if one exists. + * Instances of this bean are obtained by calling + * {@link ManagementFactory#getCompilationMXBean()}, + * if this is the case. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.5 + */ +final class VMCompilationMXBeanImpl +{ + + /** + * Returns the number of milliseconds the JIT + * compiler has spent compiling Java bytecode + * to native machine code. This is only called + * if a JIT compiler exists and the + * gnu.java.lang.management.CompilationTimeSupport + * property has been set. + * + * @return the number of milliseconds spent + * compiling. + */ + static native long getTotalCompilationTime(); + +} diff --git a/libjava/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.h b/libjava/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.h new file mode 100644 index 000000000..b01f97cd8 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.h @@ -0,0 +1,38 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMGarbageCollectorMXBeanImpl__ +#define __gnu_java_lang_management_VMGarbageCollectorMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMGarbageCollectorMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMGarbageCollectorMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMGarbageCollectorMXBeanImpl(); + static jlong getCollectionCount(::java::lang::String *); + static jlong getCollectionTime(::java::lang::String *); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMGarbageCollectorMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java b/libjava/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java new file mode 100644 index 000000000..2a202849a --- /dev/null +++ b/libjava/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java @@ -0,0 +1,80 @@ +/* VMGarbageCollectorMXBeanImpl.java - VM interface for a GC bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +/** + * Provides access to information about the garbage collectors + * of the virtual machine. Garbage collectors are responsible + * for removing unreferenced objects from memory. A garbage + * collector is a type of memory manager, so this interface + * is combined with that of generic memory managers. An instance + * of this bean for each garbage collector is obtained by calling + * {@link ManagementFactory#getGarbageCollectorMXBeans()}. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.5 + */ +final class VMGarbageCollectorMXBeanImpl +{ + + /** + * Returns the number of collections the garbage collector + * represented by this bean has made. -1 is returned if the + * collection count is undefined. + * + * @param name the name of the garbage collector. + * @return the number of collections made, or -1 if this is + * undefined. + */ + static native long getCollectionCount(String name); + + /** + * Returns the accumulated number of milliseconds this garbage + * collector has spent freeing the memory used by unreferenced + * objects. -1 is returned if the collection time is undefined. + * Note that the accumulated time may not change, even when the + * collection count increases, if the time taken is sufficiently + * short; this depends on the resolution of the timer used. + * + * @param name the name of the garbage collector. + * @return the accumulated number of milliseconds spent collecting, + * or -1 if this is undefined. + */ + static native long getCollectionTime(String name); + +} diff --git a/libjava/gnu/java/lang/management/VMMemoryMXBeanImpl.h b/libjava/gnu/java/lang/management/VMMemoryMXBeanImpl.h new file mode 100644 index 000000000..a31c551c3 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMMemoryMXBeanImpl.h @@ -0,0 +1,41 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMMemoryMXBeanImpl__ +#define __gnu_java_lang_management_VMMemoryMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMMemoryMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMMemoryMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMMemoryMXBeanImpl(); + static ::java::lang::management::MemoryUsage * getHeapMemoryUsage(); + static ::java::lang::management::MemoryUsage * getNonHeapMemoryUsage(); + static jint getObjectPendingFinalizationCount(); + static jboolean isVerbose(); + static void setVerbose(jboolean); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMMemoryMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMMemoryMXBeanImpl.java b/libjava/gnu/java/lang/management/VMMemoryMXBeanImpl.java new file mode 100644 index 000000000..193e33535 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMMemoryMXBeanImpl.java @@ -0,0 +1,109 @@ +/* VMMemoryMXBeanImpl.java - VM impl. of a memory bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +import java.lang.management.MemoryUsage; + +/** + * Provides access to information about the memory + * management of the current invocation of the virtual + * machine. Instances of this bean are obtained by calling + * {@link ManagementFactory#getMemoryMXBean()}. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.5 + */ +final class VMMemoryMXBeanImpl +{ + + /** + * Returns an instance of {@link java.lang.management.MemoryUsage} + * with appropriate initial, used, committed and maximum values + * for the heap. By default, this uses the methods of + * {@link java.lang.Runtime} to provide some of the values. + * + * @return an {@link java.lang.management.MemoryUsage} instance + * for the heap. + */ + static MemoryUsage getHeapMemoryUsage() + { + Runtime runtime = Runtime.getRuntime(); + long totalMem = runtime.totalMemory(); + return new MemoryUsage(-1, totalMem - runtime.freeMemory(), + totalMem, runtime.maxMemory()); + } + + /** + * Returns an instance of {@link java.lang.management.MemoryUsage} + * with appropriate initial, used, committed and maximum values + * for non-heap memory. + * + * @return an {@link java.lang.management.MemoryUsage} instance + * for non-heap memory. + */ + static native MemoryUsage getNonHeapMemoryUsage(); + + /** + * Returns the number of objects ready to be garbage collected. + * + * @return the number of finalizable objects. + */ + static native int getObjectPendingFinalizationCount(); + + /** + * Returns true if the virtual machine will emit additional + * information when memory is allocated and deallocated. The + * format of the output is left up to the virtual machine. + * + * @return true if verbose class loading output is on. + */ + static native boolean isVerbose(); + + /** + * Turns on or off the emission of additional information + * when memory is allocated and deallocated. The format of the + * output is left up to the virtual machine. This method + * may be called by multiple threads concurrently, but there + * is only one global setting of verbosity that is affected. + * + * @param verbose the new setting for verbose class loading + * output. + */ + static native void setVerbose(boolean verbose); + +} diff --git a/libjava/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.h b/libjava/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.h new file mode 100644 index 000000000..3a174c82a --- /dev/null +++ b/libjava/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMMemoryManagerMXBeanImpl__ +#define __gnu_java_lang_management_VMMemoryManagerMXBeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMMemoryManagerMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMMemoryManagerMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMMemoryManagerMXBeanImpl(); + static JArray< ::java::lang::String * > * getMemoryPoolNames(::java::lang::String *); + static jboolean isValid(::java::lang::String *); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMMemoryManagerMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java b/libjava/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java new file mode 100644 index 000000000..0a4204a6d --- /dev/null +++ b/libjava/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java @@ -0,0 +1,95 @@ +/* VMMemoryManagerMXBeanImpl.java - VM interface for a memory manager bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +import java.lang.management.ManagementFactory; +import java.lang.management.MemoryPoolMXBean; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * Provides access to information about the memory managers + * of the virtual machine. An instance of this bean for each + * memory manager is obtained by calling + * {@link ManagementFactory#getMemoryManagerMXBeans()}. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.5 + */ +final class VMMemoryManagerMXBeanImpl +{ + + /** + * Returns an array containing the names of the memory pools + * this memory manager manages. + * + * @param name the name of the memory manager. + * @return an array containing the name of each memory pool + * this manager is responsible for. + */ + static String[] getMemoryPoolNames(String name) + { + List managedPools = new ArrayList(); + Iterator beans = ManagementFactory.getMemoryPoolMXBeans().iterator(); + while (beans.hasNext()) + { + MemoryPoolMXBean bean = (MemoryPoolMXBean) beans.next(); + String[] managers = bean.getMemoryManagerNames(); + for (int a = 0; a < managers.length; ++a) + if (managers[a].equals(name)) + { + managedPools.add(bean.getName()); + break; + } + } + return (String[]) managedPools.toArray(new String[managedPools.size()]); + } + + /** + * Returns true if this memory manager is still valid. A memory + * manager becomes invalid when it is removed by the virtual machine + * and no longer used. + * + * @param name the name of the memory manager. + * @return true if this memory manager is valid. + */ + static native boolean isValid(String name); + +} diff --git a/libjava/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.h b/libjava/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.h new file mode 100644 index 000000000..623162ee8 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.h @@ -0,0 +1,51 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMMemoryPoolMXBeanImpl__ +#define __gnu_java_lang_management_VMMemoryPoolMXBeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMMemoryPoolMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMMemoryPoolMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMMemoryPoolMXBeanImpl(); + static ::java::lang::management::MemoryUsage * getCollectionUsage(::java::lang::String *); + static jlong getCollectionUsageThreshold(::java::lang::String *); + static jlong getCollectionUsageThresholdCount(::java::lang::String *); + static JArray< ::java::lang::String * > * getMemoryManagerNames(::java::lang::String *); + static ::java::lang::management::MemoryUsage * getPeakUsage(::java::lang::String *); + static ::java::lang::String * getType(::java::lang::String *); + static ::java::lang::management::MemoryUsage * getUsage(::java::lang::String *); + static jlong getUsageThreshold(::java::lang::String *); + static jlong getUsageThresholdCount(::java::lang::String *); + static jboolean isValid(::java::lang::String *); + static void resetPeakUsage(::java::lang::String *); + static void setCollectionUsageThreshold(::java::lang::String *, jlong); + static void setUsageThreshold(::java::lang::String *, jlong); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMMemoryPoolMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java b/libjava/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java new file mode 100644 index 000000000..723d4e897 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java @@ -0,0 +1,195 @@ +/* MemoryPoolMXBeanImpl.java - VM interface for memory pool beans + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +import java.lang.management.MemoryUsage; + +/** + * Provides access to information on the memory resources or + * pools used by the current invocation of the virtual machine. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.5 + */ +final class VMMemoryPoolMXBeanImpl +{ + + /** + * Returns memory usage statistics for the specified pool + * just after a best-effort attempt to free memory. This + * is valid only for certain garbage collectors. + * + * @param name the name of the pool to obtain statistics on. + * @return a {@link java.lang.management.MemoryUsage} object + * containing the statistics or null + * if this pool does not support such statistics. + */ + static native MemoryUsage getCollectionUsage(String name); + + /** + * Returns the collection usage threshold for the specified pool. + * This is only called if this functionality is supported + * by the virtual machine (i.e. the appropriate property, + * gnu.java.lang.management.CollectionUsageThresholdSupport, + * is defined). The value is initially zero. + * + * @param name the name of the pool to obtain statistics on. + * @return the collection usage threshold. + */ + static native long getCollectionUsageThreshold(String name); + + /** + * Returns the number of times the collection usage threshold + * has been met or exceeded by the specified pool. + * This is only called if this functionality is supported + * by the virtual machine (i.e. the appropriate property, + * gnu.java.lang.management.CollectionUsageThresholdSupport, + * is defined). + * + * @param name the name of the pool to obtain statistics on. + * @return the collection usage threshold count. + */ + static native long getCollectionUsageThresholdCount(String name); + + /** + * Returns an array of names of memory managers which manage + * the specified pool. + * + * @param name the name of the pool to obtain statistics on. + * @return a list of memory managers for the pool. + */ + static native String[] getMemoryManagerNames(String name); + + /** + * Returns the peak usage level of the specified pool. + * This is only called if the pool is valid. + * + * @param name the name of the pool to obtain statistics on. + * @return a {@link java.lang.management.MemoryUsage} object + * containing the statistics. + */ + static native MemoryUsage getPeakUsage(String name); + + /** + * Returns the type of memory used by the specified pool. + * The value must be either "HEAP" or "NON_HEAP". + * + * @param name the name of the pool to obtain statistics on. + * @return the type of the given pool. + */ + static native String getType(String name); + + /** + * Returns the current usage level of the specified pool. + * This is only called if the pool is valid. + * + * @param name the name of the pool to obtain statistics on. + * @return a {@link java.lang.management.MemoryUsage} object + * containing the statistics. + */ + static native MemoryUsage getUsage(String name); + + /** + * Returns the usage threshold for the specified pool. + * This is only called if this functionality is supported + * by the virtual machine (i.e. the appropriate property, + * gnu.java.lang.management.UsageThresholdSupport, + * is defined). The value is initially defined by the + * virtual machine. + * + * @param name the name of the pool to obtain statistics on. + * @return the usage threshold. + */ + static native long getUsageThreshold(String name); + + /** + * Returns the number of times the usage threshold + * has been met or exceeded by the specified pool. + * This is only called if this functionality is supported + * by the virtual machine (i.e. the appropriate property, + * gnu.java.lang.management.UsageThresholdSupport, + * is defined). + * + * @param name the name of the pool to obtain statistics on. + * @return the usage threshold count. + */ + static native long getUsageThresholdCount(String name); + + /** + * Returns true if the specified pool is still valid i.e. + * it is still in use by the virtual machine. + * + * @param name the name of the pool to check the validity of. + * @return true if the pool is valid. + */ + static native boolean isValid(String name); + + /** + * Resets the peak usage level to the current usage level for + * the specified pool. + * + * @param name the name of the pool to reset the peak usage of. + */ + static native void resetPeakUsage(String name); + + /** + * Sets the collection usage threshold for the specified + * pool to the supplied value. + * This is only called if this functionality is supported + * by the virtual machine (i.e. the appropriate property, + * gnu.java.lang.management.CollectionUsageThresholdSupport, + * is defined). + * + * @param name the name of the pool to set the threshold of. + * @param threshold the new threshold level. + */ + static native void setCollectionUsageThreshold(String name, long threshold); + + /** + * Sets the usage threshold for the specified pool to the supplied value. + * This is only called if this functionality is supported + * by the virtual machine (i.e. the appropriate property, + * gnu.java.lang.management.UsageThresholdSupport, + * is defined). + * + * @param name the name of the pool to set the threshold of. + * @param threshold the new threshold level. + */ + static native void setUsageThreshold(String name, long threshold); + +} diff --git a/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.h b/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.h new file mode 100644 index 000000000..183f4ba2e --- /dev/null +++ b/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMOperatingSystemMXBeanImpl__ +#define __gnu_java_lang_management_VMOperatingSystemMXBeanImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMOperatingSystemMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMOperatingSystemMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMOperatingSystemMXBeanImpl(); + static jdouble getSystemLoadAverage(); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMOperatingSystemMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java b/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java new file mode 100644 index 000000000..20b3f9ed2 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java @@ -0,0 +1,68 @@ +/* VMOperatingSystemMXBeanImpl.java - VM implementation of an OS bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +import gnu.classpath.Configuration; + +/** + * Provides access to information about the operating system. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.6 + */ +final class VMOperatingSystemMXBeanImpl +{ + + static + { + if (Configuration.INIT_LOAD_LIBRARY) + { + System.loadLibrary("javalangmanagement"); + } + } + + /** + * Returns the system load average from the last + * minute. + * + * @return the system load average from the last + * minute. + */ + static native double getSystemLoadAverage(); + +} diff --git a/libjava/gnu/java/lang/management/VMRuntimeMXBeanImpl.h b/libjava/gnu/java/lang/management/VMRuntimeMXBeanImpl.h new file mode 100644 index 000000000..9bd0e4422 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMRuntimeMXBeanImpl.h @@ -0,0 +1,43 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMRuntimeMXBeanImpl__ +#define __gnu_java_lang_management_VMRuntimeMXBeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMRuntimeMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMRuntimeMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMRuntimeMXBeanImpl(); + static JArray< ::java::lang::String * > * getInputArguments(); + static ::java::lang::String * getName(); + static jlong getStartTime(); +private: + static jlong getPID(); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMRuntimeMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMRuntimeMXBeanImpl.java b/libjava/gnu/java/lang/management/VMRuntimeMXBeanImpl.java new file mode 100644 index 000000000..05d368a9e --- /dev/null +++ b/libjava/gnu/java/lang/management/VMRuntimeMXBeanImpl.java @@ -0,0 +1,109 @@ +/* VMRuntimeMXBeanImpl.java - VM implementation of an runtime bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +import gnu.classpath.SystemProperties; + +import java.net.InetAddress; +import java.net.UnknownHostException; + +/** + * Provides access to information about the virtual machine. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.5 + */ +final class VMRuntimeMXBeanImpl +{ + + /** + * Returns the command-line arguments supplied + * to the virtual machine, excluding those supplied + * to main(). + * + * @return the command-line arguments. + */ + static native String[] getInputArguments(); + + /** + * Returns a developer-chosen name for the virtual + * machine, which may differ over different running + * instances of the same virtual machine binary. + * For example, this may include the particular + * process identifier used by this instance or + * the host name of the machine on which it is + * running. The intention is that this name refers + * to the precise entity that the other data supplied + * by the bean refers to, rather than the VM in general. + * + * @return the custom name of the VM. + */ + static String getName() + { + String hostName; + try + { + hostName = InetAddress.getLocalHost().getHostName(); + } + catch (UnknownHostException e) + { + hostName = "Unknown host"; + } + return SystemProperties.getProperty("java.vm.name") + " " + + SystemProperties.getProperty("java.vm.version") + " [" + + getPID() + "@" + hostName + "]"; + } + + /** + * The time in milliseconds at which the virtual + * machine was started. This method is only executed + * once (for efficency), as the value is not expected + * to change. + * + * @return the VM start time. + */ + static native long getStartTime(); + + /** + * The process identifier of the runtime. + * + * @return the PID of the runtime. + */ + private static native long getPID(); + +} diff --git a/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.h b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.h new file mode 100644 index 000000000..4c8ab8c45 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.h @@ -0,0 +1,56 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMThreadMXBeanImpl__ +#define __gnu_java_lang_management_VMThreadMXBeanImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMThreadMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMThreadMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMThreadMXBeanImpl(); + static JArray< jlong > * findDeadlockedThreads(); + static JArray< jlong > * findMonitorDeadlockedThreads(); + static JArray< ::java::lang::Thread * > * getAllThreads(); + static JArray< jlong > * getAllThreadIds(); + static jlong getCurrentThreadCpuTime(); + static jlong getCurrentThreadUserTime(); + static jint getDaemonThreadCount(); + static void getLockInfo(::java::lang::management::ThreadInfo *); + static void getMonitorInfo(::java::lang::management::ThreadInfo *); + static jint getPeakThreadCount(); + static jint getThreadCount(); + static jlong getThreadCpuTime(jlong); + static ::java::lang::management::ThreadInfo * getThreadInfoForId(jlong, jint); + static jlong getThreadUserTime(jlong); + static jlong getTotalStartedThreadCount(); + static void resetPeakThreadCount(); +private: + static jint filled; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMThreadMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java new file mode 100644 index 000000000..1c061aa93 --- /dev/null +++ b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java @@ -0,0 +1,236 @@ +/* VMThreadMXBeanImpl.java - VM impl. of a thread bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +import java.lang.management.ThreadInfo; + +/** + * Provides access to information about the threads + * of the virtual machine. An instance of this bean is + * obtained by calling + * {@link ManagementFactory#getThreadMXBean()}. + * See {@link java.lang.management.ThreadMXBean} for + * full documentation. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.5 + */ +final class VMThreadMXBeanImpl +{ + + /** + * Cache of how many threads were found. + */ + private static int filled; + + /** + * Returns the ids of cycles of deadlocked threads, occurring + * due to monitor ownership or ownable synchronizer ownership. + * This will only be called if ownable synchronizer monitoring + * is supported. + * + * @return the ids of the deadlocked threads. + */ + static native long[] findDeadlockedThreads(); + + /** + * Returns the ids of cycles of deadlocked threads, occurring + * due to monitor ownership. + * + * @return the ids of the deadlocked threads. + */ + static native long[] findMonitorDeadlockedThreads(); + + /* This is the same as in Thread.getAllStackTraces() */ + static Thread[] getAllThreads() + { + ThreadGroup group = Thread.currentThread().getThreadGroup(); + while (group.getParent() != null) + group = group.getParent(); + int arraySize = group.activeCount(); + Thread[] threadList = new Thread[arraySize]; + filled = group.enumerate(threadList); + while (filled == arraySize) + { + arraySize *= 2; + threadList = new Thread[arraySize]; + filled = group.enumerate(threadList); + } + return threadList; + } + + /** + * Returns the id of all live threads at the time of execution. + * + * @return the live thread ids. + */ + static long[] getAllThreadIds() + { + Thread[] threadList = getAllThreads(); + long[] ids = new long[filled]; + for (int a = 0; a < filled; ++a) + ids[a] = threadList[a].getId(); + return ids; + } + + /** + * Returns the number of nanoseconds of CPU time + * the current thread has used in total. This is + * only called if this feature is enabled and + * supported. + * + * @return the nanoseconds of CPU time used by + * the current thread. + */ + static native long getCurrentThreadCpuTime(); + + /** + * Returns the number of nanoseconds of user time + * the current thread has used in total. This is + * only called if this feature is enabled and + * supported. + * + * @return the nanoseconds of user time used by + * the current thread. + */ + static native long getCurrentThreadUserTime(); + + /** + * Returns the number of live daemon threads. + * + * @return the number of live daemon threads. + */ + static int getDaemonThreadCount() + { + Thread[] threadList = getAllThreads(); + int daemonCount = 0; + for (int a = 0; a < filled; ++a) + { + if (threadList[a].isDaemon()) + ++daemonCount; + } + return daemonCount; + } + + /** + * Fill out the given {@link ThreadInfo} object + * with ownable synchronizer usage information. + * This is only called if ownable synchronizer + * usage monitoring is supported. + * + * @param info the {@link ThreadInfo} object to modify. + */ + static native void getLockInfo(ThreadInfo info); + + /** + * Fill out the given {@link ThreadInfo} object + * with monitor usage information. This is only + * called if monitor usage monitoring is supported. + * + * @param info the {@link ThreadInfo} object to modify. + */ + static native void getMonitorInfo(ThreadInfo info); + + /** + * Returns the current peak number of live threads. + * + * @return the peak number of live threads. + */ + static native int getPeakThreadCount(); + + /** + * Returns the number of live threads. + * + * @return the number of live threads. + */ + static int getThreadCount() + { + getAllThreads(); + return filled; + } + + /** + * Returns the number of nanoseconds of CPU time + * the specified thread has used in total. This is + * only called if this feature is enabled and + * supported. + * + * @param id the thread to obtain statistics on. + * @return the nanoseconds of CPU time used by + * the thread. + */ + static native long getThreadCpuTime(long id); + + /** + * Returns the {@link java.lang.management.ThreadInfo} + * which corresponds to the specified id. + * + * @param id the id of the thread. + * @param maxDepth the depth of the stack trace. + * @return the corresponding ThreadInfo. + */ + static native ThreadInfo getThreadInfoForId(long id, int maxDepth); + + /** + * Returns the number of nanoseconds of user time + * the specified thread has used in total. This is + * only called if this feature is enabled and + * supported. + * + * @param id the thread to obtain statistics on. + * @return the nanoseconds of user time used by + * the thread. + */ + static native long getThreadUserTime(long id); + + /** + * Returns the total number of threads that have + * been started over the lifetime of the virtual + * machine. + * + * @return the total number of threads started. + */ + static native long getTotalStartedThreadCount(); + + /** + * Resets the peak thread count to the current + * number of live threads. + */ + static native void resetPeakThreadCount(); + +} diff --git a/libjava/gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc new file mode 100644 index 000000000..5958b1f1d --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc @@ -0,0 +1,49 @@ +/* Copyright (C) 2006 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +/** + * @author Andrew John Hughes + * @date Sun 20 Aug 2006 */ +/* Written using online API docs for JDK 1.5 beta from http://java.sun.com. + * Status: Believed complete and correct. + */ + +#include + +#include + +#include + +jint +gnu::java::lang::management::VMClassLoadingMXBeanImpl::getLoadedClassCount () +{ + /* FIXME: We never unload, so this never goes down again */ + return ::gcj::loadedClasses; +} + + +jlong +gnu::java::lang::management::VMClassLoadingMXBeanImpl::getUnloadedClassCount () +{ + /* FIXME: We never unload, so this always == 0 */ + return ::gcj::unloadedClasses; +} + + +jboolean +gnu::java::lang::management::VMClassLoadingMXBeanImpl::isVerbose () +{ + return ::gcj::verbose_class_flag; +} + + +void +gnu::java::lang::management::VMClassLoadingMXBeanImpl::setVerbose (jboolean b) +{ + ::gcj::verbose_class_flag = b; +} diff --git a/libjava/gnu/java/lang/management/natVMCompilationMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMCompilationMXBeanImpl.cc new file mode 100644 index 000000000..4ccadcb3c --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMCompilationMXBeanImpl.cc @@ -0,0 +1,11 @@ +#include + +#include +#include +#include + +jlong +gnu::java::lang::management::VMCompilationMXBeanImpl::getTotalCompilationTime () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMCompilationMXBeanImpl::getTotalCompilationTime () not implemented")); +} diff --git a/libjava/gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc new file mode 100644 index 000000000..3e4f999fe --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc @@ -0,0 +1,18 @@ +#include + +#include +#include +#include + +jlong +gnu::java::lang::management::VMGarbageCollectorMXBeanImpl::getCollectionCount (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMGarbageCollectorMXBeanImpl::getCollectionCount (::java::lang::String *) not implemented")); +} + + +jlong +gnu::java::lang::management::VMGarbageCollectorMXBeanImpl::getCollectionTime (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMGarbageCollectorMXBeanImpl::getCollectionTime (::java::lang::String *) not implemented")); +} diff --git a/libjava/gnu/java/lang/management/natVMMemoryMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMMemoryMXBeanImpl.cc new file mode 100644 index 000000000..8b59815f5 --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMMemoryMXBeanImpl.cc @@ -0,0 +1,47 @@ +/* Copyright (C) 2006 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +/** + * @author Andrew John Hughes + * @date Tue 08 Aug 2006 */ +/* + * Status: Stubbed. + */ + +#include + +#include +#include +#include + +::java::lang::management::MemoryUsage * +gnu::java::lang::management::VMMemoryMXBeanImpl::getNonHeapMemoryUsage () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryMXBeanImpl::getNonHeapMemoryUsage () not implemented")); +} + + +jint +gnu::java::lang::management::VMMemoryMXBeanImpl::getObjectPendingFinalizationCount () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryMXBeanImpl::getObjectPendingFinalizationCount () not implemented")); +} + + +jboolean +gnu::java::lang::management::VMMemoryMXBeanImpl::isVerbose () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryMXBeanImpl::isVerbose () not implemented")); +} + + +void +gnu::java::lang::management::VMMemoryMXBeanImpl::setVerbose (jboolean) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryMXBeanImpl::setVerbose (jboolean) not implemented")); +} diff --git a/libjava/gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc new file mode 100644 index 000000000..8d8a3e6e7 --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc @@ -0,0 +1,11 @@ +#include + +#include +#include +#include + +jboolean +gnu::java::lang::management::VMMemoryManagerMXBeanImpl::isValid (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryManagerMXBeanImpl::isValid (::java::lang::String *) not implemented")); +} diff --git a/libjava/gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc new file mode 100644 index 000000000..7bc0162d3 --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc @@ -0,0 +1,111 @@ +/* Copyright (C) 2006 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +/** + * @author Andrew John Hughes + * @date Tue 08 Aug 2006 */ +/* Implemented for our sole pool, the heap (we ignore the name input). + * Status: Stubbed. + */ + +#include + +#include +#include +#include + +::java::lang::management::MemoryUsage * +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getCollectionUsage(jstring) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getCollectionUsage (::java::lang::String *) not implemented")); +} + + +jlong +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getCollectionUsageThreshold (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getCollectionUsageThreshold (::java::lang::String *) not implemented")); +} + + +jlong +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getCollectionUsageThresholdCount (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getCollectionUsageThresholdCount (::java::lang::String *) not implemented")); +} + + +JArray< ::java::lang::String *> * +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getMemoryManagerNames(jstring) +{ + return (JArray*) + JvNewObjectArray(1, &::java::lang::String::class$, JvNewStringLatin1("BoehmGC")); +} + + +::java::lang::management::MemoryUsage * +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getPeakUsage (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getPeakUsage (::java::lang::String *) not implemented")); +} + + +::java::lang::String * +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getType (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getType (::java::lang::String *) not implemented")); +} + + +::java::lang::management::MemoryUsage * +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getUsage (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getUsage (::java::lang::String *) not implemented")); +} + + +jlong +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getUsageThreshold (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getUsageThreshold (::java::lang::String *) not implemented")); +} + + +jlong +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getUsageThresholdCount (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::getUsageThresholdCount (::java::lang::String *) not implemented")); +} + + +jboolean +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::isValid (::java::lang::String *) +{ + return true; +} + + +void +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::resetPeakUsage (::java::lang::String *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::resetPeakUsage (::java::lang::String *) not implemented")); +} + + +void +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::setCollectionUsageThreshold (::java::lang::String *, jlong) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::setCollectionUsageThreshold (::java::lang::String *, jlong) not implemented")); +} + + +void +gnu::java::lang::management::VMMemoryPoolMXBeanImpl::setUsageThreshold (::java::lang::String *, jlong) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMMemoryPoolMXBeanImpl::setUsageThreshold (::java::lang::String *, jlong) not implemented")); +} diff --git a/libjava/gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc new file mode 100644 index 000000000..daea76bbf --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc @@ -0,0 +1,18 @@ +#include + +#include +#include +#include + +jdouble +gnu::java::lang::management::VMOperatingSystemMXBeanImpl::getSystemLoadAverage () +{ +#ifdef HAVE_GETLOADAVG + double avg[1]; + int nos = getloadavg(avg, 1); + if (nos == 1) + return avg[0]; + else +#endif + return -1; +} diff --git a/libjava/gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc new file mode 100644 index 000000000..331079b0f --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc @@ -0,0 +1,39 @@ +/* Copyright (C) 2006 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +/** + * @author Andrew John Hughes + * @date Wed 21 Jun 2006 */ +/* Written using online API docs for JDK 1.5 beta from http://java.sun.com. + * Status: Believed complete and correct. + */ + +#include + +#include + +#include + +#include + +JArray* gnu::java::lang::management::VMRuntimeMXBeanImpl::getInputArguments() +{ + return ::gcj::vmArgs; +} + +jlong gnu::java::lang::management::VMRuntimeMXBeanImpl::getStartTime() +{ + return ::gcj::startTime; +} + +jlong gnu::java::lang::management::VMRuntimeMXBeanImpl::getPID() +{ + return getpid(); +} + + diff --git a/libjava/gnu/java/lang/management/natVMThreadMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMThreadMXBeanImpl.cc new file mode 100644 index 000000000..5d48957ba --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMThreadMXBeanImpl.cc @@ -0,0 +1,83 @@ +#include + +#include +#include +#include + +jlongArray +gnu::java::lang::management::VMThreadMXBeanImpl::findDeadlockedThreads () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::findDeadlockedThreads () not implemented")); +} + +jlongArray +gnu::java::lang::management::VMThreadMXBeanImpl::findMonitorDeadlockedThreads () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::findMonitorDeadlockedThreads () not implemented")); +} + +jlong +gnu::java::lang::management::VMThreadMXBeanImpl::getCurrentThreadCpuTime () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getCurrentThreadCpuTime () not implemented")); +} + + +jlong +gnu::java::lang::management::VMThreadMXBeanImpl::getCurrentThreadUserTime () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getCurrentThreadUserTime () not implemented")); +} + +void +gnu::java::lang::management::VMThreadMXBeanImpl::getLockInfo (::java::lang::management::ThreadInfo *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getLockInfo () not implemented")); +} + +void +gnu::java::lang::management::VMThreadMXBeanImpl::getMonitorInfo (::java::lang::management::ThreadInfo *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getMonitorInfo () not implemented")); +} + +jint +gnu::java::lang::management::VMThreadMXBeanImpl::getPeakThreadCount () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getPeakThreadCount () not implemented")); +} + + +jlong +gnu::java::lang::management::VMThreadMXBeanImpl::getThreadCpuTime (jlong) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getThreadCpuTime (jlong) not implemented")); +} + + +::java::lang::management::ThreadInfo * +gnu::java::lang::management::VMThreadMXBeanImpl::getThreadInfoForId (jlong, jint) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getThreadInfoForId (jlong, jint) not implemented")); +} + + +jlong +gnu::java::lang::management::VMThreadMXBeanImpl::getThreadUserTime (jlong) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getThreadUserTime (jlong) not implemented")); +} + + +jlong +gnu::java::lang::management::VMThreadMXBeanImpl::getTotalStartedThreadCount () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getTotalStartedThreadCount () not implemented")); +} + + +void +gnu::java::lang::management::VMThreadMXBeanImpl::resetPeakThreadCount () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::resetPeakThreadCount () not implemented")); +} diff --git a/libjava/gnu/java/lang/natMainThread.cc b/libjava/gnu/java/lang/natMainThread.cc new file mode 100644 index 000000000..5cba24700 --- /dev/null +++ b/libjava/gnu/java/lang/natMainThread.cc @@ -0,0 +1,65 @@ +// natMainThread.cc - Implementation of MainThread native methods. + +/* Copyright (C) 1998, 1999, 2000, 2001, 2003, 2006 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +typedef void main_func (jobject); + +void +gnu::java::lang::MainThread::call_main (void) +{ + Utf8Const* main_signature = _Jv_makeUtf8Const ("([Ljava.lang.String;)V", 22); + Utf8Const* main_name = _Jv_makeUtf8Const ("main", 4); + + // This is one of the few places where we might have access to an + // unlinked class. + _Jv_Linker::wait_for_state (klass, JV_STATE_LOADING); + + _Jv_Method *meth = _Jv_LookupDeclaredMethod (klass, main_name, + main_signature); + + // Some checks from Java Spec section 12.1.4. + const char *msg = NULL; + if (meth == NULL) + msg = "no suitable method `main' in class"; + else if (! ::java::lang::reflect::Modifier::isStatic(meth->accflags)) + msg = "`main' must be static"; + else if (! ::java::lang::reflect::Modifier::isPublic(meth->accflags)) + msg = "`main' must be public"; + if (msg != NULL) + { + fprintf (stderr, "%s\n", msg); + ::exit(1); + } + + main_func *real_main = (main_func *) meth->ncode; + (*real_main) (args); + + // Note that we do thread cleanup here. We have to do this here and + // not in _Jv_RunMain; if we do if after the main thread has exited, + // our ThreadGroup will be null, and if Runtime.exit tries to create + // a new Thread (which it does when running shutdown hooks), it will + // eventually NPE due to this. + _Jv_ThreadWait (); + + int status = (int) ::java::lang::ThreadGroup::had_uncaught_exception; + ::java::lang::Runtime::exitNoChecksAccessor (status); +} diff --git a/libjava/gnu/java/lang/reflect/ClassSignatureParser.h b/libjava/gnu/java/lang/reflect/ClassSignatureParser.h new file mode 100644 index 000000000..10c0f4d38 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/ClassSignatureParser.h @@ -0,0 +1,45 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_ClassSignatureParser__ +#define __gnu_java_lang_reflect_ClassSignatureParser__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class ClassSignatureParser; + } + } + } + } +} + +class gnu::java::lang::reflect::ClassSignatureParser : public ::gnu::java::lang::reflect::GenericSignatureParser +{ + +public: + ClassSignatureParser(::java::lang::Class *, ::java::lang::String *); + virtual JArray< ::java::lang::reflect::TypeVariable * > * getTypeParameters(); + virtual ::java::lang::reflect::Type * getSuperclassType(); + virtual JArray< ::java::lang::reflect::Type * > * getInterfaceTypes(); +private: + JArray< ::java::lang::reflect::TypeVariable * > * __attribute__((aligned(__alignof__( ::gnu::java::lang::reflect::GenericSignatureParser)))) typeParameters; + ::java::lang::reflect::Type * superclassType; + JArray< ::java::lang::reflect::Type * > * interfaceTypes; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_ClassSignatureParser__ diff --git a/libjava/gnu/java/lang/reflect/FieldSignatureParser.h b/libjava/gnu/java/lang/reflect/FieldSignatureParser.h new file mode 100644 index 000000000..58b972a43 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/FieldSignatureParser.h @@ -0,0 +1,39 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_FieldSignatureParser__ +#define __gnu_java_lang_reflect_FieldSignatureParser__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class FieldSignatureParser; + } + } + } + } +} + +class gnu::java::lang::reflect::FieldSignatureParser : public ::gnu::java::lang::reflect::GenericSignatureParser +{ + +public: + FieldSignatureParser(::java::lang::Class *, ::java::lang::String *); + ::java::lang::reflect::Type * getFieldType(); +private: + ::java::lang::reflect::Type * __attribute__((aligned(__alignof__( ::gnu::java::lang::reflect::GenericSignatureParser)))) type; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_FieldSignatureParser__ diff --git a/libjava/gnu/java/lang/reflect/GenericArrayTypeImpl.h b/libjava/gnu/java/lang/reflect/GenericArrayTypeImpl.h new file mode 100644 index 000000000..25a654d77 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/GenericArrayTypeImpl.h @@ -0,0 +1,44 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_GenericArrayTypeImpl__ +#define __gnu_java_lang_reflect_GenericArrayTypeImpl__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class GenericArrayTypeImpl; + } + } + } + } +} + +class gnu::java::lang::reflect::GenericArrayTypeImpl : public ::gnu::java::lang::reflect::TypeImpl +{ + +public: // actually package-private + GenericArrayTypeImpl(::java::lang::reflect::Type *); + ::java::lang::reflect::Type * resolve(); +public: + ::java::lang::reflect::Type * getGenericComponentType(); + jboolean equals(::java::lang::Object *); + jint hashCode(); + ::java::lang::String * toString(); +private: + ::java::lang::reflect::Type * __attribute__((aligned(__alignof__( ::gnu::java::lang::reflect::TypeImpl)))) componentType; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_GenericArrayTypeImpl__ diff --git a/libjava/gnu/java/lang/reflect/GenericSignatureParser.h b/libjava/gnu/java/lang/reflect/GenericSignatureParser.h new file mode 100644 index 000000000..22e443b59 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/GenericSignatureParser.h @@ -0,0 +1,62 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_GenericSignatureParser__ +#define __gnu_java_lang_reflect_GenericSignatureParser__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class GenericSignatureParser; + } + } + } + } +} + +class gnu::java::lang::reflect::GenericSignatureParser : public ::java::lang::Object +{ + +public: // actually package-private + GenericSignatureParser(::java::lang::reflect::GenericDeclaration *, ::java::lang::ClassLoader *, ::java::lang::String *); + virtual JArray< ::java::lang::reflect::TypeVariable * > * readFormalTypeParameters(); +private: + ::java::lang::reflect::TypeVariable * readFormalTypeParameter(); +public: // actually package-private + virtual ::java::lang::reflect::Type * readFieldTypeSignature(); + virtual ::java::lang::reflect::Type * readClassTypeSignature(); +private: + JArray< ::java::lang::reflect::Type * > * readTypeArguments(); + ::java::lang::reflect::Type * readTypeArgument(); +public: // actually package-private + virtual ::java::lang::reflect::Type * readArrayTypeSignature(); + virtual ::java::lang::reflect::Type * readTypeVariableSignature(); +private: + ::java::lang::String * readIdentifier(); +public: // actually package-private + virtual jchar peekChar(); + virtual jchar readChar(); + virtual void consume(jchar); + virtual void end(); +private: + ::java::lang::ClassLoader * __attribute__((aligned(__alignof__( ::java::lang::Object)))) loader; + ::java::lang::reflect::GenericDeclaration * container; + ::java::lang::String * signature; + jint pos; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_GenericSignatureParser__ diff --git a/libjava/gnu/java/lang/reflect/MethodSignatureParser.h b/libjava/gnu/java/lang/reflect/MethodSignatureParser.h new file mode 100644 index 000000000..3a6846995 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/MethodSignatureParser.h @@ -0,0 +1,52 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_MethodSignatureParser__ +#define __gnu_java_lang_reflect_MethodSignatureParser__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class MethodSignatureParser; + } + } + } + } +} + +class gnu::java::lang::reflect::MethodSignatureParser : public ::gnu::java::lang::reflect::GenericSignatureParser +{ + +public: + MethodSignatureParser(::java::lang::reflect::Method *, ::java::lang::String *); + MethodSignatureParser(::java::lang::reflect::Constructor *, ::java::lang::String *); +private: + MethodSignatureParser(::java::lang::reflect::GenericDeclaration *, ::java::lang::ClassLoader *, ::java::lang::String *); +public: + virtual JArray< ::java::lang::reflect::TypeVariable * > * getTypeParameters(); + virtual JArray< ::java::lang::reflect::Type * > * getGenericParameterTypes(); + virtual ::java::lang::reflect::Type * getGenericReturnType(); + virtual JArray< ::java::lang::reflect::Type * > * getGenericExceptionTypes(); +private: + ::java::lang::reflect::Type * readTypeSignature(); + JArray< ::java::lang::reflect::TypeVariable * > * __attribute__((aligned(__alignof__( ::gnu::java::lang::reflect::GenericSignatureParser)))) typeParameters; + JArray< ::java::lang::reflect::Type * > * argTypes; + ::java::lang::reflect::Type * retType; + JArray< ::java::lang::reflect::Type * > * throwsSigs; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_MethodSignatureParser__ diff --git a/libjava/gnu/java/lang/reflect/ParameterizedTypeImpl.h b/libjava/gnu/java/lang/reflect/ParameterizedTypeImpl.h new file mode 100644 index 000000000..0f43af60e --- /dev/null +++ b/libjava/gnu/java/lang/reflect/ParameterizedTypeImpl.h @@ -0,0 +1,52 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_ParameterizedTypeImpl__ +#define __gnu_java_lang_reflect_ParameterizedTypeImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class ParameterizedTypeImpl; + } + } + } + } +} + +class gnu::java::lang::reflect::ParameterizedTypeImpl : public ::gnu::java::lang::reflect::TypeImpl +{ + +public: // actually package-private + ParameterizedTypeImpl(::java::lang::String *, ::java::lang::ClassLoader *, ::java::lang::reflect::Type *, JArray< ::java::lang::reflect::Type * > *); + ::java::lang::reflect::Type * resolve(); +public: + JArray< ::java::lang::reflect::Type * > * getActualTypeArguments(); + ::java::lang::reflect::Type * getRawType(); + ::java::lang::reflect::Type * getOwnerType(); + jboolean equals(::java::lang::Object *); + jint hashCode(); + ::java::lang::String * toString(); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::gnu::java::lang::reflect::TypeImpl)))) rawTypeName; + ::java::lang::ClassLoader * loader; + ::java::lang::Class * rawType; + ::java::lang::reflect::Type * owner; + JArray< ::java::lang::reflect::Type * > * typeArgs; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_ParameterizedTypeImpl__ diff --git a/libjava/gnu/java/lang/reflect/TypeImpl.h b/libjava/gnu/java/lang/reflect/TypeImpl.h new file mode 100644 index 000000000..42c3f3af8 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/TypeImpl.h @@ -0,0 +1,41 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_TypeImpl__ +#define __gnu_java_lang_reflect_TypeImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class TypeImpl; + } + } + } + } +} + +class gnu::java::lang::reflect::TypeImpl : public ::java::lang::Object +{ + +public: // actually package-private + TypeImpl(); + virtual ::java::lang::reflect::Type * resolve() = 0; + static void resolve(JArray< ::java::lang::reflect::Type * > *); + static ::java::lang::reflect::Type * resolve(::java::lang::reflect::Type *); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_TypeImpl__ diff --git a/libjava/gnu/java/lang/reflect/TypeSignature.h b/libjava/gnu/java/lang/reflect/TypeSignature.h new file mode 100644 index 000000000..822605859 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/TypeSignature.h @@ -0,0 +1,44 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_TypeSignature__ +#define __gnu_java_lang_reflect_TypeSignature__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class TypeSignature; + } + } + } + } +} + +class gnu::java::lang::reflect::TypeSignature : public ::java::lang::Object +{ + +public: + TypeSignature(); + static ::java::lang::String * getEncodingOfClass(::java::lang::String *, jboolean); + static ::java::lang::String * getEncodingOfClass(::java::lang::Class *, jboolean); + static ::java::lang::String * getEncodingOfClass(::java::lang::Class *); + static ::java::lang::Class * getClassForEncoding(::java::lang::String *, jboolean); + static ::java::lang::Class * getClassForEncoding(::java::lang::String *, jboolean, ::java::lang::ClassLoader *); + static ::java::lang::Class * getClassForEncoding(::java::lang::String *); + static ::java::lang::String * getEncodingOfMethod(::java::lang::reflect::Method *); + static ::java::lang::String * getEncodingOfConstructor(::java::lang::reflect::Constructor *); + static ::java::lang::String * getEncodingOfMember(::java::lang::reflect::Member *); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_TypeSignature__ diff --git a/libjava/gnu/java/lang/reflect/TypeVariableImpl.h b/libjava/gnu/java/lang/reflect/TypeVariableImpl.h new file mode 100644 index 000000000..82ac58ab8 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/TypeVariableImpl.h @@ -0,0 +1,50 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_TypeVariableImpl__ +#define __gnu_java_lang_reflect_TypeVariableImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class TypeVariableImpl; + } + } + } + } +} + +class gnu::java::lang::reflect::TypeVariableImpl : public ::gnu::java::lang::reflect::TypeImpl +{ + +public: // actually package-private + TypeVariableImpl(::java::lang::reflect::GenericDeclaration *, JArray< ::java::lang::reflect::Type * > *, ::java::lang::String *); + ::java::lang::reflect::Type * resolve(); +public: + JArray< ::java::lang::reflect::Type * > * getBounds(); + ::java::lang::reflect::GenericDeclaration * getGenericDeclaration(); + ::java::lang::String * getName(); + jboolean equals(::java::lang::Object *); + jint hashCode(); + ::java::lang::String * toString(); +private: + ::java::lang::reflect::GenericDeclaration * __attribute__((aligned(__alignof__( ::gnu::java::lang::reflect::TypeImpl)))) decl; + JArray< ::java::lang::reflect::Type * > * bounds; + ::java::lang::String * name; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_TypeVariableImpl__ diff --git a/libjava/gnu/java/lang/reflect/UnresolvedTypeVariable.h b/libjava/gnu/java/lang/reflect/UnresolvedTypeVariable.h new file mode 100644 index 000000000..4fec000b5 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/UnresolvedTypeVariable.h @@ -0,0 +1,41 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_UnresolvedTypeVariable__ +#define __gnu_java_lang_reflect_UnresolvedTypeVariable__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class UnresolvedTypeVariable; + } + } + } + } +} + +class gnu::java::lang::reflect::UnresolvedTypeVariable : public ::gnu::java::lang::reflect::TypeImpl +{ + +public: // actually package-private + UnresolvedTypeVariable(::java::lang::reflect::GenericDeclaration *, ::java::lang::String *); + ::java::lang::reflect::Type * resolve(); +private: + static ::java::lang::reflect::GenericDeclaration * getParent(::java::lang::reflect::GenericDeclaration *); + ::java::lang::reflect::GenericDeclaration * __attribute__((aligned(__alignof__( ::gnu::java::lang::reflect::TypeImpl)))) decl; + ::java::lang::String * name; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_UnresolvedTypeVariable__ diff --git a/libjava/gnu/java/lang/reflect/WildcardTypeImpl.h b/libjava/gnu/java/lang/reflect/WildcardTypeImpl.h new file mode 100644 index 000000000..b2eb19c35 --- /dev/null +++ b/libjava/gnu/java/lang/reflect/WildcardTypeImpl.h @@ -0,0 +1,48 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_reflect_WildcardTypeImpl__ +#define __gnu_java_lang_reflect_WildcardTypeImpl__ + +#pragma interface + +#include +#include + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace reflect + { + class WildcardTypeImpl; + } + } + } + } +} + +class gnu::java::lang::reflect::WildcardTypeImpl : public ::gnu::java::lang::reflect::TypeImpl +{ + +public: // actually package-private + WildcardTypeImpl(::java::lang::reflect::Type *, ::java::lang::reflect::Type *); + ::java::lang::reflect::Type * resolve(); +public: + JArray< ::java::lang::reflect::Type * > * getUpperBounds(); + JArray< ::java::lang::reflect::Type * > * getLowerBounds(); + jboolean equals(::java::lang::Object *); + jint hashCode(); + ::java::lang::String * toString(); +private: + ::java::lang::reflect::Type * __attribute__((aligned(__alignof__( ::gnu::java::lang::reflect::TypeImpl)))) lower; + ::java::lang::reflect::Type * upper; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_reflect_WildcardTypeImpl__ -- cgit v1.2.3