You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/03/31 17:34:51 UTC
svn commit: r390443 [1/5] - in /incubator/harmony/enhanced/classlib/trunk:
make/ make/patternsets/ modules/kernel/ modules/luni-kernel/
modules/luni-kernel/META-INF/ modules/luni-kernel/src/
modules/luni-kernel/src/main/ modules/luni-kernel/src/main/ja...
Author: tellison
Date: Fri Mar 31 07:34:47 2006
New Revision: 390443
URL: http://svn.apache.org/viewcvs?rev=390443&view=rev
Log:
Split kernel into luni and security fragments.
Added:
incubator/harmony/enhanced/classlib/trunk/make/patternsets/luni-kernel.txt
incubator/harmony/enhanced/classlib/trunk/make/patternsets/security-kernel.txt
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/META-INF/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/META-INF/MANIFEST.MF
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/ibm/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/ibm/oti/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/ibm/oti/vm/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/ibm/oti/vm/VM.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Package.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Runtime.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/StackTraceElement.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/String.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/System.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Thread.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ThreadGroup.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Throwable.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/PhantomReference.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/Reference.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/SoftReference.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/reflect/
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/reflect/AccessibleObject.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/reflect/Array.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/reflect/Constructor.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/reflect/Field.java
incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/reflect/Method.java
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/META-INF/
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/META-INF/MANIFEST.MF
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/src/
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/src/main/
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/src/main/java/
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/src/main/java/java/
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/src/main/java/java/security/
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/src/main/java/java/security/AccessControlContext.java
incubator/harmony/enhanced/classlib/trunk/modules/security-kernel/src/main/java/java/security/AccessController.java
Removed:
incubator/harmony/enhanced/classlib/trunk/modules/kernel/
incubator/harmony/enhanced/classlib/trunk/native-src/shared/vmls/makefile
Modified:
incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
Modified: incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/build-java.xml?rev=390443&r1=390442&r2=390443&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-java.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-java.xml Fri Mar 31 07:34:47 2006
@@ -90,39 +90,40 @@
<jar destfile="${components.output}/applet.jar"
manifest="modules/applet/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/applet.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/applet.txt" />
</jar>
<!-- Create archive jar -->
<jar destfile="${components.output}/archive.jar"
manifest="modules/archive/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/archive.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/archive.txt" />
</jar>
<!-- Create awt jar -->
<jar destfile="${components.output}/awt.jar"
manifest="modules/awt/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/awt.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/awt.txt" />
</jar>
<!-- Create beans jar -->
<jar destfile="${components.output}/beans.jar"
manifest="modules/beans/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/beans.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/beans.txt" />
</jar>
- <!-- Create (non-functional) kernel jar (to compile against) -->
- <jar destfile="${components.output}/kernel-stubs.jar"
- manifest="modules/kernel/META-INF/MANIFEST.MF">
+ <!-- Create (non-functional) kernel jars (to compile against) -->
+ <jar destfile="${components.output}/luni-kernel-stubs.jar"
+ manifest="modules/luni-kernel/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/luni-kernel.txt" />
+ </jar>
+ <jar destfile="${components.output}/security-kernel-stubs.jar"
+ manifest="modules/security-kernel/META-INF/MANIFEST.MF">
+ <fileset dir="${build.output}"
+ includesfile="${components.patternsets}/security-kernel.txt" />
</jar>
<!-- Create luni jar -->
@@ -130,23 +131,21 @@
manifest="modules/luni/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
includesfile="${components.patternsets}/luni.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ excludesfile="${components.patternsets}/luni-kernel.txt" />
</jar>
<!-- Create nio jar -->
<jar destfile="${components.output}/nio.jar"
manifest="modules/nio/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/nio.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/nio.txt" />
</jar>
<!-- Create nio_char jar -->
<jar destfile="${components.output}/nio_char.jar"
manifest="modules/nio_char/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/nio_char.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/nio_char.txt" />
</jar>
<!-- Create security jar -->
@@ -154,87 +153,77 @@
manifest="modules/security/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
includesfile="${components.patternsets}/security.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ excludesfile="${components.patternsets}/security-kernel.txt" />
</jar>
<!-- Create x-net jar -->
<jar destfile="${components.output}/x-net.jar"
manifest="modules/x-net/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/x-net.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/x-net.txt"/>
</jar>
<!-- Create crypto jar -->
<jar destfile="${components.output}/crypto.jar"
manifest="modules/crypto/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/crypto.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/crypto.txt"/>
</jar>
<!-- Create text jar -->
<jar destfile="${components.output}/text.jar"
manifest="modules/text/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/text.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/text.txt"/>
</jar>
<!-- Create math jar -->
<jar destfile="${components.output}/math.jar"
manifest="modules/math/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/math.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/math.txt"/>
</jar>
<!-- Create regex jar -->
<jar destfile="${components.output}/regex.jar"
manifest="modules/regex/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/regex.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/regex.txt" />
</jar>
<!-- Create rmi jar -->
<jar destfile="${components.output}/rmi.jar"
manifest="modules/rmi/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/rmi.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/rmi.txt" />
</jar>
<!-- Create sql jar -->
<jar destfile="${components.output}/sql.jar"
manifest="modules/sql/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/sql.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/sql.txt" />
</jar>
<!-- Create jndi jar -->
<jar destfile="${components.output}/jndi.jar"
manifest="modules/jndi/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/jndi.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/jndi.txt" />
</jar>
<!-- Create logging jar -->
<jar destfile="${components.output}/logging.jar"
manifest="modules/logging/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/logging.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/logging.txt" />
</jar>
<!-- Create prefs jar -->
<jar destfile="${components.output}/prefs.jar"
manifest="modules/prefs/META-INF/MANIFEST.MF">
<fileset dir="${build.output}"
- includesfile="${components.patternsets}/prefs.txt"
- excludesfile="${components.patternsets}/kernel.txt" />
+ includesfile="${components.patternsets}/prefs.txt" />
</jar>
</target>
@@ -252,17 +241,17 @@
<src path="modules/awt/src/main/java" />
<src path="modules/beans/src/main/java" />
<src path="modules/crypto/src/main/java" />
- <src path="modules/kernel/src/main/java" />
<src path="modules/regex/src/main/java" />
<src path="modules/math/src/main/java" />
<src path="modules/archive/src/main/java" />
<src path="modules/luni/src/main/java" />
+ <src path="modules/luni-kernel/src/main/java" />
<src path="modules/nio/src/main/java" />
<src path="modules/nio_char/src/main/java" />
<src path="modules/security/src/common/javasrc" />
<src path="modules/security/src/windows/javasrc" />
<src path="modules/security/src/linux/javasrc" />
-
+ <src path="modules/security-kernel/src/main/java" />
<src path="modules/x-net/src/main/java/" />
<src path="modules/rmi/src/main/java" />
Added: incubator/harmony/enhanced/classlib/trunk/make/patternsets/luni-kernel.txt
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/patternsets/luni-kernel.txt?rev=390443&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/patternsets/luni-kernel.txt (added)
+++ incubator/harmony/enhanced/classlib/trunk/make/patternsets/luni-kernel.txt Fri Mar 31 07:34:47 2006
@@ -0,0 +1,80 @@
+# Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+java/lang/Object.*
+java/lang/Object$*.*
+java/lang/Class.*
+java/lang/Class$*.*
+java/lang/ClassLoader.*
+java/lang/ClassLoader$*.*
+java/lang/Compiler.*
+java/lang/Compiler$*.*
+java/lang/J9VMInternals.*
+java/lang/J9VMInternals$*.*
+java/lang/Package.*
+java/lang/Package$*.*
+java/lang/Runtime.*
+java/lang/Runtime$*.*
+java/lang/StackTraceElement.*
+java/lang/StackTraceElement$*.*
+java/lang/String.*
+java/lang/String$*.*
+java/lang/System.*
+java/lang/System$*.*
+java/lang/Thread.*
+java/lang/Thread$*.*
+java/lang/ThreadGroup.*
+java/lang/ThreadGroup$*.*
+java/lang/Throwable.*
+java/lang/Throwable$*.*
+
+java/lang/reflect/AccessibleObject.*
+java/lang/reflect/AccessibleObject$*.*
+java/lang/reflect/Array.*
+java/lang/reflect/Array$*.*
+java/lang/reflect/Constructor.*
+java/lang/reflect/Constructor$*.*
+java/lang/reflect/Field.*
+java/lang/reflect/Field$*.*
+java/lang/reflect/Method.*
+java/lang/reflect/Method$*.*
+
+java/lang/ref/Reference.*
+java/lang/ref/Reference$*.*
+java/lang/ref/PhantomReference.*
+java/lang/ref/PhantomReference$*.*
+java/lang/ref/SoftReference.*
+java/lang/ref/SoftReference$*.*
+java/lang/ref/WeakReference.*
+java/lang/ref/WeakReference$*.*
+
+com/ibm/oti/util/IdentityHashtable.*
+com/ibm/oti/util/IdentityHashtable$*.*
+
+com/ibm/oti/vm/AbstractClassLoader.*
+com/ibm/oti/vm/AbstractClassLoader$*.*
+com/ibm/oti/vm/BootstrapClassLoader.*
+com/ibm/oti/vm/BootstrapClassLoader$*.*
+com/ibm/oti/vm/JarRunner.*
+com/ibm/oti/vm/JarRunner$*.*
+com/ibm/oti/vm/ReflectObjectInvalidException.*
+com/ibm/oti/vm/ReflectObjectInvalidException$*.*
+com/ibm/oti/vm/URLAppClassLoader.*
+com/ibm/oti/vm/URLAppClassLoader$*.*
+com/ibm/oti/vm/URLExtensionClassLoader.*
+com/ibm/oti/vm/URLExtensionClassLoader$*.*
+com/ibm/oti/vm/URLSystemClassLoader.*
+com/ibm/oti/vm/URLSystemClassLoader$*.*
+com/ibm/oti/vm/VM.*
+com/ibm/oti/vm/VM$*.*
Added: incubator/harmony/enhanced/classlib/trunk/make/patternsets/security-kernel.txt
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/patternsets/security-kernel.txt?rev=390443&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/patternsets/security-kernel.txt (added)
+++ incubator/harmony/enhanced/classlib/trunk/make/patternsets/security-kernel.txt Fri Mar 31 07:34:47 2006
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+java/security/AccessController.*
+java/security/AccessController$*.*
+java/security/AccessControlContext.*
+java/security/AccessControlContext$*.*
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/META-INF/MANIFEST.MF?rev=390443&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/META-INF/MANIFEST.MF (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/META-INF/MANIFEST.MF Fri Mar 31 07:34:47 2006
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Harmony LUNI Kernel
+Bundle-ClassPath: .
+Fragment-Host: org.apache.harmony.luni;bundle-version="1.0.0"
+Eclipse-JREBundle: true
+Bundle-SymbolicName: org.apache.harmony.luni.kernel
+Bundle-Version: 1.0.0
+Export-Package: java.lang,
+ java.lang.reflect,
+ java.lang.ref,
+ com.ibm.oti.vm
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/ibm/oti/vm/VM.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/ibm/oti/vm/VM.java?rev=390443&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/ibm/oti/vm/VM.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/com/ibm/oti/vm/VM.java Fri Mar 31 07:34:47 2006
@@ -0,0 +1,248 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.ibm.oti.vm;
+
+/**
+ * This class must be implemented by the vm vendor. Represents the running
+ * virtual machine. All VM specific API are implemented on this class.
+ * <p>
+ * Note that all methods in VM are static. There is no singleton instance which
+ * represents the actively running VM.
+ */
+public final class VM {
+
+ /**
+ * This method must be provided by the vm vendor, as it is used by
+ * com.ibm.oti.vm.MsgHelp.setLocale() to get the bootstrap ClassLoader.
+ * MsgHelp uses the bootstrap ClassLoader to find the resource bundle of
+ * messages packaged with the bootstrap classes. Returns the ClassLoader of
+ * the method (including natives) at the specified depth on the stack of the
+ * calling thread. Frames representing the VM implementation of
+ * java.lang.reflect are not included in the list. This is not a public
+ * method as it can return the bootstrap class loader, which should not be
+ * accessed by non-bootstrap classes. Notes:
+ * <ul>
+ * <li>This method operates on the defining classes of methods on stack.
+ * NOT the classes of receivers.</li>
+ * <li>The item at depth zero is the caller of this method</li>
+ * </ul>
+ *
+ * @param depth
+ * the stack depth of the requested ClassLoader
+ * @return the ClassLoader at the specified depth
+ * @see java.lang.ClassLoader#getStackClassLoader
+ */
+ static final ClassLoader getStackClassLoader(int depth) {
+ return null;
+ };
+
+ /**
+ * This method must be provided by the vm vendor, as it is used by other
+ * provided class implementations. For example,
+ * java.io.ObjectInputStream.readObject() and
+ * java.io.ObjectInputStream.resolveProxyClass(). It is also useful for
+ * other classes, such as java.rmi.server.RMIClassLoader. Walk the stack and
+ * answer the most recent non-null and non-bootstrap ClassLoader on the
+ * stack of the calling thread. If no such ClassLoader is found, null is
+ * returned. Notes: 1) This method operates on the defining classes of
+ * methods on stack. NOT the classes of receivers.
+ *
+ * @return the first non-bootstrap ClassLoader on the stack
+ */
+ static public final ClassLoader getNonBootstrapClassLoader() {
+ return null;
+ };
+
+ /**
+ * Initialize the classloader.
+ *
+ * @param loader
+ * ClassLoader the ClassLoader instance
+ * @param bootLoader
+ * boolean true for the bootstrap class loader
+ */
+ public final static void initializeClassLoader(ClassLoader loader,
+ boolean bootLoader) {
+ return;
+ };
+
+ /**
+ * Native used to find and load a class using the VM
+ *
+ * @return java.lang.Class the class or null.
+ * @param className
+ * String the name of the class to search for.
+ * @param classLoader
+ * the classloader to do the work
+ */
+ static Class findClassOrNull(String className, ClassLoader classLoader) {
+ return null;
+ };
+
+ /**
+ * This method must be included, as it is used by
+ * ResourceBundle.getBundle(), and other places as well. The reference
+ * implementation of this method uses the getStackClassLoader() method.
+ * Returns the ClassLoader of the method that called the caller. i.e. A.x()
+ * calls B.y() calls callerClassLoader(), A's ClassLoader will be returned.
+ * Returns null for the bootstrap ClassLoader.
+ *
+ * @return a ClassLoader or null for the bootstrap ClassLoader
+ * @throws SecurityException
+ * when called from a non-bootstrap Class
+ */
+ public static ClassLoader callerClassLoader() {
+ return null;
+ }
+
+ /**
+ * Native used to dump a string to the system console for debugging.
+ *
+ * @param str
+ * String the String to display
+ */
+ public static void dumpString(String str) {
+ return;
+ };
+
+ /**
+ * Get the classpath entry that was used to load the class that is the arg.
+ * <p>
+ * This method is for internal use only.
+ *
+ * @param targetClass
+ * Class the class to set the classpath of.
+ * @see java.lang.Class
+ */
+ static int getCPIndexImpl(Class targetClass) {
+ return 0;
+ };
+
+ /**
+ * Does internal initializaion required by VM.
+ *
+ */
+ static void initializeVM() {
+ }
+
+ /**
+ * Registers a new virtual-machine shutdown hook. This is equivalent to the
+ * 1.3 API of the same name.
+ *
+ * @param hook
+ * the hook (a Thread) to register
+ */
+ public static void addShutdownHook(Thread hook) {
+ return;
+ }
+
+ /**
+ * De-registers a previously-registered virtual-machine shutdown hook. This
+ * is equivalent to the 1.3 API of the same name.
+ *
+ * @param hook
+ * the hook (a Thread) to de-register
+ * @return true if the hook could be de-registered
+ */
+ public static boolean removeShutdownHook(Thread hook) {
+ return false;
+ }
+
+ /**
+ * This method must be provided by the vm vendor. Called to signal that the
+ * com.ibm.oti.net.www.protocol.jar.JarURLConnection class has been loaded
+ * and JarURLConnection.closeCachedFiles() should be called on VM shutdown.
+ *
+ * @see #shutdown()
+ */
+ public static void closeJars() {
+ return;
+ }
+
+ /**
+ * This method must be provided by the vm vendor. Called to signal that the
+ * com.ibm.oti.util.DeleteOnExit class has been loaded and
+ * DeleteOnExit.deleteOnExit() should be called on VM shutdown.
+ *
+ * @see #shutdown()
+ */
+ public static void deleteOnExit() {
+ return;
+ }
+
+ static final int CPE_TYPE_UNKNOWN = 0;
+
+ static final int CPE_TYPE_DIRECTORY = 1;
+
+ static final int CPE_TYPE_JAR = 2;
+
+ static final int CPE_TYPE_TCP = 3;
+
+ static final int CPE_TYPE_UNUSABLE = 5;
+
+ /**
+ * Return the type of the specified entry on the class path for a ClassLoader.
+ * Valid tyes are:
+ * CPE_TYPE_UNKNOWN
+ * CPE_TYPE_DIRECTORY
+ * CPE_TYPE_JAR
+ * CPE_TYPE_TCP - this is obsolete
+ * CPE_TYPE_UNUSABLE
+ *
+ * @param classLoader the ClassLoader
+ * @param cpIndex the index on the class path
+ *
+ * @return a int which specifies the class path entry type
+ */
+ static final int getClassPathEntryType(Object classLoader, int cpIndex) {
+ return 0;
+ };
+
+ /**
+ * Returns command line arguments passed to the VM. Internally these are
+ * broken into optionString and extraInfo. This only returns the
+ * optionString part.
+ * <p>
+ *
+ * @return a String array containing the optionString part of command line
+ * arguments
+ */
+ public static String[] getVMArgs() {
+ return null;
+ };
+
+ /**
+ * Return the number of entries on the bootclasspath.
+ *
+ * @return an int which is the number of entries on the bootclasspath
+ */
+ static int getClassPathCount() {
+ return 0;
+ };
+
+ /**
+ * Return the specified bootclasspath entry.
+ *
+ * @param index the index of the bootclasspath entry
+ *
+ * @return a byte array containing the bootclasspath entry
+ * specified in the vm options
+ */
+ static byte[] getPathFromClassPath(int index) {
+ return null;
+ };
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java?rev=390443&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java Fri Mar 31 07:34:47 2006
@@ -0,0 +1,655 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.security.ProtectionDomain;
+
+/**
+ * This class must be implemented by the vm vendor. The documented natives must
+ * be implemented to support other provided class implementations in this
+ * package. An instance of class Class is the in-image representation of a Java
+ * class. There are three basic types of Classes
+ * <dl>
+ * <dt><em>Classes representing object types (classes or interfaces)</em>
+ * </dt>
+ * <dd>These are Classes which represent the class of a simple instance as
+ * found in the class hierarchy. The name of one of these Classes is simply the
+ * fully qualified class name of the class or interface that it represents. Its
+ * <em>signature</em> is the letter "L", followed by its name, followed by a
+ * semi-colon (";").</dd>
+ * <dt><em>Classes representing base types</em></dt>
+ * <dd>These Classes represent the standard Java base types. Although it is not
+ * possible to create new instances of these Classes, they are still useful for
+ * providing reflection information, and as the component type of array classes.
+ * There is one of these Classes for each base type, and their signatures are:
+ * <ul>
+ * <li><code>B</code> representing the <code>byte</code> base type</li>
+ * <li><code>S</code> representing the <code>short</code> base type</li>
+ * <li><code>I</code> representing the <code>int</code> base type</li>
+ * <li><code>J</code> representing the <code>long</code> base type</li>
+ * <li><code>F</code> representing the <code>float</code> base type</li>
+ * <li><code>D</code> representing the <code>double</code> base type</li>
+ * <li><code>C</code> representing the <code>char</code> base type</li>
+ * <li><code>Z</code> representing the <code>boolean</code> base type</li>
+ * <li><code>V</code> representing void function return values</li>
+ * </ul>
+ * The name of a Class representing a base type is the keyword which is used to
+ * represent the type in Java source code (i.e. "int" for the <code>int</code>
+ * base type.</dd>
+ * <dt><em>Classes representing array classes</em></dt>
+ * <dd>These are Classes which represent the classes of Java arrays. There is
+ * one such Class for all array instances of a given arity (number of
+ * dimensions) and leaf component type. In this case, the name of the class is
+ * one or more left square brackets (one per dimension in the array) followed by
+ * the signature ofP the class representing the leaf component type, which can
+ * be either an object type or a base type. The signature of a Class
+ * representing an array type is the same as its name.</dd>
+ * </dl>
+ *
+ */
+public final class Class implements java.io.Serializable {
+ private static final long serialVersionUID = 3206093459760846163L;
+
+ /**
+ * Answers a Class object which represents the class named by the argument.
+ * The name should be the name of a class as described in the class
+ * definition of java.lang.Class, however Classes representing base types
+ * can not be found using this method.
+ *
+ * @param className
+ * The name of the non-base type class to find
+ * @return the named Class
+ * @throws ClassNotFoundException
+ * If the class could not be found
+ * @see java.lang.Class
+ */
+ public static Class forName(String className) throws ClassNotFoundException {
+ return null;
+ }
+
+ /**
+ * Answers a Class object which represents the class named by the argument.
+ * The name should be the name of a class as described in the class
+ * definition of java.lang.Class, however Classes representing base types
+ * can not be found using this method. Security rules will be obeyed.
+ *
+ * @param className
+ * The name of the non-base type class to find
+ * @param initializeBoolean
+ * A boolean indicating whether the class should be initialized
+ * @param classLoader
+ * The classloader to use to load the class
+ * @return the named class.
+ * @throws ClassNotFoundException
+ * If the class could not be found
+ * @see java.lang.Class
+ */
+ public static Class forName(String className, boolean initializeBoolean,
+ ClassLoader classLoader) throws ClassNotFoundException {
+ return null;
+ }
+
+ /**
+ * Answers an array containing all public class members of the class which
+ * the receiver represents and its superclasses and interfaces
+ *
+ * @return the class' public class members
+ * @throws SecurityException
+ * If member access is not allowed
+ * @see java.lang.Class
+ */
+ public Class[] getClasses() {
+ return null;
+ }
+
+ /**
+ * Verify the specified Class using the VM byte code verifier.
+ *
+ * @throws VerifyError if the Class cannot be verified
+ */
+ void verify() {
+ return;
+ }
+
+ /**
+ * Answers the classloader which was used to load the class represented by
+ * the receiver. Answer null if the class was loaded by the system class
+ * loader
+ *
+ * @return the receiver's class loader or nil
+ * @see java.lang.ClassLoader
+ */
+ public ClassLoader getClassLoader() {
+ return null;
+ }
+
+ /**
+ * This must be provided by the vm vendor, as it is used by other provided
+ * class implementations in this package. Outside of this class, it is used
+ * by SecurityManager.checkMemberAccess(), classLoaderDepth(),
+ * currentClassLoader() and currentLoadedClass(). Return the ClassLoader for
+ * this Class without doing any security checks. The bootstrap ClassLoader
+ * is returned, unlike getClassLoader() which returns null in place of the
+ * bootstrap ClassLoader.
+ *
+ * @return the ClassLoader
+ * @see ClassLoader#isSystemClassLoader()
+ */
+ ClassLoader getClassLoaderImpl() {
+ return null;
+ };
+
+ /**
+ * Answers a Class object which represents the receiver's component type if
+ * the receiver represents an array type. Otherwise answers nil. The
+ * component type of an array type is the type of the elements of the array.
+ *
+ * @return the component type of the receiver.
+ * @see java.lang.Class
+ */
+ public Class getComponentType() {
+ return null;
+ };
+
+ /**
+ * Answers a public Constructor object which represents the constructor
+ * described by the arguments.
+ *
+ * @param parameterTypes
+ * the types of the arguments.
+ * @return the constructor described by the arguments.
+ * @throws NoSuchMethodException
+ * if the constructor could not be found.
+ * @throws SecurityException
+ * if member access is not allowed
+ * @see #getConstructors
+ */
+ public Constructor getConstructor(Class parameterTypes[])
+ throws NoSuchMethodException, SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an array containing Constructor objects describing all
+ * constructors which are visible from the current execution context.
+ *
+ * @return all visible constructors starting from the receiver.
+ * @throws SecurityException
+ * if member access is not allowed
+ * @see #getMethods
+ */
+ public Constructor[] getConstructors() throws SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an array containing all class members of the class which the
+ * receiver represents. Note that some of the fields which are returned may
+ * not be visible in the current execution context.
+ *
+ * @return the class' class members
+ * @throws SecurityException
+ * if member access is not allowed
+ * @see java.lang.Class
+ */
+ public Class[] getDeclaredClasses() throws SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers a Constructor object which represents the constructor described
+ * by the arguments.
+ *
+ * @param parameterTypes
+ * the types of the arguments.
+ * @return the constructor described by the arguments.
+ * @throws NoSuchMethodException
+ * if the constructor could not be found.
+ * @throws SecurityException
+ * if member access is not allowed
+ * @see #getConstructors
+ */
+ public Constructor getDeclaredConstructor(Class parameterTypes[])
+ throws NoSuchMethodException, SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an array containing Constructor objects describing all
+ * constructor which are defined by the receiver. Note that some of the
+ * fields which are returned may not be visible in the current execution
+ * context.
+ *
+ * @return the receiver's constructors.
+ * @throws SecurityException
+ * if member access is not allowed
+ * @see #getMethods
+ */
+ public Constructor[] getDeclaredConstructors() throws SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers a Field object describing the field in the receiver named by the
+ * argument. Note that the Constructor may not be visible from the current
+ * execution context.
+ *
+ * @param name
+ * The name of the field to look for.
+ * @return the field in the receiver named by the argument.
+ * @throws NoSuchFieldException
+ * if the requested field could not be found
+ * @throws SecurityException
+ * if member access is not allowed
+ * @see #getDeclaredFields
+ */
+ public Field getDeclaredField(String name) throws NoSuchFieldException,
+ SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an array containing Field objects describing all fields which are
+ * defined by the receiver. Note that some of the fields which are returned
+ * may not be visible in the current execution context.
+ *
+ * @return the receiver's fields.
+ * @throws SecurityException
+ * If member access is not allowed
+ * @see #getFields
+ */
+ public Field[] getDeclaredFields() throws SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers a Method object which represents the method described by the
+ * arguments. Note that the associated method may not be visible from the
+ * current execution context.
+ *
+ * @param name
+ * the name of the method
+ * @param parameterTypes
+ * the types of the arguments.
+ * @return the method described by the arguments.
+ * @throws NoSuchMethodException
+ * if the method could not be found.
+ * @throws SecurityException
+ * If member access is not allowed
+ * @see #getMethods
+ */
+ public Method getDeclaredMethod(String name, Class parameterTypes[])
+ throws NoSuchMethodException, SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an array containing Method objects describing all methods which
+ * are defined by the receiver. Note that some of the methods which are
+ * returned may not be visible in the current execution context.
+ *
+ * @throws SecurityException
+ * if member access is not allowed
+ * @return the receiver's methods.
+ * @see #getMethods
+ */
+ public Method[] getDeclaredMethods() throws SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers the class which declared the class represented by the receiver.
+ * This will return null if the receiver is a member of another class.
+ *
+ * @return the declaring class of the receiver.
+ */
+ public Class getDeclaringClass() {
+ return null;
+ }
+
+ /**
+ * Answers a Field object describing the field in the receiver named by the
+ * argument which must be visible from the current execution context.
+ *
+ * @param name
+ * The name of the field to look for.
+ * @return the field in the receiver named by the argument.
+ * @throws NoSuchFieldException
+ * If the given field does not exist
+ * @throws SecurityException
+ * If access is denied
+ * @see #getDeclaredFields
+ */
+ public Field getField(String name) throws NoSuchFieldException,
+ SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an array containing Field objects describing all fields which are
+ * visible from the current execution context.
+ *
+ * @return all visible fields starting from the receiver.
+ * @throws SecurityException
+ * If member access is not allowed
+ * @see #getDeclaredFields
+ */
+ public Field[] getFields() throws SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an array of Class objects which match the interfaces specified in
+ * the receiver classes <code>implements</code> declaration
+ *
+ * @return Class[] the interfaces the receiver claims to implement.
+ */
+ public Class[] getInterfaces() {
+ return null;
+ };
+
+ /**
+ * Answers a Method object which represents the method described by the
+ * arguments.
+ *
+ * @param name
+ * String the name of the method
+ * @param parameterTypes
+ * Class[] the types of the arguments.
+ * @return Method the method described by the arguments.
+ * @throws NoSuchMethodException
+ * if the method could not be found.
+ * @throws SecurityException
+ * if member access is not allowed
+ * @see #getMethods
+ */
+ public Method getMethod(String name, Class parameterTypes[])
+ throws NoSuchMethodException, SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an array containing Method objects describing all methods which
+ * are visible from the current execution context.
+ *
+ * @return Method[] all visible methods starting from the receiver.
+ * @throws SecurityException
+ * if member access is not allowed
+ * @see #getDeclaredMethods
+ */
+ public Method[] getMethods() throws SecurityException {
+ return null;
+ }
+
+ /**
+ * Answers an integer which which is the receiver's modifiers. Note that the
+ * constants which describe the bits which are returned are implemented in
+ * class java.lang.reflect.Modifier which may not be available on the
+ * target.
+ *
+ * @return the receiver's modifiers
+ */
+ public int getModifiers() {
+ return 0;
+ };
+
+ /**
+ * Answers the name of the class which the receiver represents. For a
+ * description of the format which is used, see the class definition of
+ * java.lang.Class.
+ *
+ * @return the receiver's name.
+ * @see java.lang.Class
+ */
+ public String getName() {
+ return null;
+ };
+
+ /**
+ * Answers the ProtectionDomain of the receiver.
+ * <p>
+ * Note: In order to conserve space in embedded targets, we allow this
+ * method to answer null for classes in the system protection domain (i.e.
+ * for system classes). System classes are always given full permissions
+ * (i.e. AllPermission). This is not changeable via the
+ * java.security.Policy.
+ *
+ * @return ProtectionDomain the receiver's ProtectionDomain.
+ * @see java.lang.Class
+ */
+ public ProtectionDomain getProtectionDomain() {
+ return null;
+ }
+
+ /**
+ * Answers the ProtectionDomain of the receiver.
+ * <p>
+ * This method is for internal use only.
+ *
+ * @return ProtectionDomain the receiver's ProtectionDomain.
+ * @see java.lang.Class
+ */
+ ProtectionDomain getPDImpl() {
+ return null;
+ };
+
+ /**
+ * Answers a read-only stream on the contents of the resource specified by
+ * resName. The mapping between the resource name and the stream is managed
+ * by the class' class loader.
+ *
+ * @param resName
+ * the name of the resource.
+ * @return a stream on the resource.
+ * @see java.lang.ClassLoader
+ */
+ public URL getResource(String resName) {
+ return null;
+ }
+
+ /**
+ * Answers a read-only stream on the contents of the resource specified by
+ * resName. The mapping between the resource name and the stream is managed
+ * by the class' class loader.
+ *
+ * @param resName
+ * the name of the resource.
+ * @return a stream on the resource.
+ * @see java.lang.ClassLoader
+ */
+ public InputStream getResourceAsStream(String resName) {
+ return null;
+ }
+
+ /**
+ * Answers the signers for the class represented by the receiver, or null if
+ * there are no signers.
+ *
+ * @return the signers of the receiver.
+ * @see #getMethods
+ */
+ public Object[] getSigners() {
+ return null;
+ }
+
+ /**
+ * Answers the Class which represents the receiver's superclass. For Classes
+ * which represent base types, interfaces, and for java.lang.Object the
+ * method answers null.
+ *
+ * @return the receiver's superclass.
+ */
+ public Class getSuperclass() {
+ return null;
+ };
+
+ /**
+ * Answers true if the receiver represents an array class.
+ *
+ * @return <code>true</code> if the receiver represents an array class
+ * <code>false</code> if it does not represent an array class
+ */
+ public boolean isArray() {
+ return false;
+ };
+
+ /**
+ * Answers true if the type represented by the argument can be converted via
+ * an identity conversion or a widening reference conversion (i.e. if either
+ * the receiver or the argument represent primitive types, only the identity
+ * conversion applies).
+ *
+ * @return <code>true</code> the argument can be assigned into the
+ * receiver <code>false</code> the argument cannot be assigned
+ * into the receiver
+ * @param cls
+ * Class the class to test
+ * @throws NullPointerException
+ * if the parameter is null
+ */
+ public boolean isAssignableFrom(Class cls) {
+ return false;
+ };
+
+ /**
+ * Answers true if the argument is non-null and can be cast to the type of
+ * the receiver. This is the runtime version of the <code>instanceof</code>
+ * operator.
+ *
+ * @return <code>true</code> the argument can be cast to the type of the
+ * receiver <code>false</code> the argument is null or cannot be
+ * cast to the type of the receiver
+ * @param object
+ * Object the object to test
+ */
+ public boolean isInstance(Object object) {
+ return false;
+ };
+
+ /**
+ * Answers true if the receiver represents an interface.
+ *
+ * @return <code>true</code> if the receiver represents an interface
+ * <code>false</code> if it does not represent an interface
+ */
+ public boolean isInterface() {
+ return false;
+ }
+
+ /**
+ * Answers true if the receiver represents a base type.
+ *
+ * @return <code>true</code> if the receiver represents a base type
+ * <code>false</code> if it does not represent a base type
+ */
+ public boolean isPrimitive() {
+ return false;
+ };
+
+ /**
+ * Answers a new instance of the class represented by the receiver, created
+ * by invoking the default (i.e. zero-argument) constructor. If there is no
+ * such constructor, or if the creation fails (either because of a lack of
+ * available memory or because an exception is thrown by the constructor),
+ * an InstantiationException is thrown. If the default constructor exists,
+ * but is not accessible from the context where this message is sent, an
+ * IllegalAccessException is thrown.
+ *
+ * @return a new instance of the class represented by the receiver.
+ * @throws IllegalAccessException
+ * if the constructor is not visible to the sender.
+ * @throws InstantiationException
+ * if the instance could not be created.
+ */
+ public Object newInstance() throws IllegalAccessException,
+ InstantiationException {
+ return null;
+ }
+
+ /**
+ * Answers a string containing a concise, human-readable description of the
+ * receiver.
+ *
+ * @return a printable representation for the receiver.
+ */
+ public String toString() {
+ return null;
+ }
+
+ /**
+ * Returns the Package of which this class is a member. A class has a
+ * Package iff it was loaded from a SecureClassLoader
+ *
+ * @return Package the Package of which this class is a member or null
+ */
+ public Package getPackage() {
+ return null;
+ }
+
+ /**
+ * Returns the assertion status for this class. Assertion is
+ * enabled/disabled based on classloader default, package or class default
+ * at runtime
+ *
+ * @return the assertion status for this class
+ */
+ public boolean desiredAssertionStatus() {
+ return false;
+ }
+
+ /**
+ * This must be provided by the vm vendor, as it is used by other provided
+ * class implementations in this package. This method is used by
+ * SecurityManager.classDepth(), and getClassContext() which use the
+ * parameters (-1, false) and SecurityManager.classLoaderDepth(),
+ * currentClassLoader(), and currentLoadedClass() which use the parameters
+ * (-1, true). Walk the stack and answer an array containing the maxDepth
+ * most recent classes on the stack of the calling thread. Starting with the
+ * caller of the caller of getStackClasses(), return an array of not more
+ * than maxDepth Classes representing the classes of running methods on the
+ * stack (including native methods). Frames representing the VM
+ * implementation of java.lang.reflect are not included in the list. If
+ * stopAtPrivileged is true, the walk will terminate at any frame running
+ * one of the following methods: <code><ul>
+ * <li>java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;</li>
+ * <li>java/security/AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;</li>
+ * <li>java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;</li>
+ * <li>java/security/AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;</li>
+ * </ul></code> If one of the doPrivileged methods is found, the walk terminate
+ * and that frame is NOT included in the returned array. Notes:
+ * <ul>
+ * <li>This method operates on the defining classes of methods on stack.
+ * NOT the classes of receivers.</li>
+ * <li>The item at index zero in the result array describes the caller of
+ * the caller of this method.</li>
+ * </ul>
+ *
+ * @param maxDepth
+ * maximum depth to walk the stack, -1 for the entire stack
+ * @param stopAtPrivileged
+ * stop at priviledged classes
+ * @return the array of the most recent classes on the stack
+ */
+ static final Class[] getStackClasses(int maxDepth, boolean stopAtPrivileged) {
+ return null;
+ };
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java?rev=390443&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java Fri Mar 31 07:34:47 2006
@@ -0,0 +1,643 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.security.ProtectionDomain;
+import java.util.Enumeration;
+
+
+/**
+ * This class must be implemented by the vm vendor. The documented methods and
+ * natives must be implemented to support other provided class implementations
+ * in this package. ClassLoaders are used to dynamically load, link and install
+ * classes into a running image.
+ *
+ */
+public abstract class ClassLoader {
+
+ static ClassLoader systemClassLoader;
+
+ static final void initializeClassLoaders() {
+ return;
+ }
+
+ /**
+ * Constructs a new instance of this class with the system class loader as
+ * its parent.
+ *
+ * @exception SecurityException
+ * if a security manager exists and it does not allow the
+ * creation of new ClassLoaders.
+ */
+ protected ClassLoader() {
+ super();
+ }
+
+ /**
+ * Constructs a new instance of this class with the given class loader as
+ * its parent.
+ *
+ * @param parentLoader
+ * ClassLoader the ClassLoader to use as the new class loaders
+ * parent.
+ * @exception SecurityException
+ * if a security manager exists and it does not allow the
+ * creation of new ClassLoaders.
+ * @exception NullPointerException
+ * if the parent is null.
+ */
+ protected ClassLoader(ClassLoader parentLoader) {
+ super();
+ }
+
+ /**
+ * Constructs a new class from an array of bytes containing a class
+ * definition in class file format.
+ *
+ * @param classRep
+ * byte[] a memory image of a class file.
+ * @param offset
+ * int the offset into the classRep.
+ * @param length
+ * int the length of the class file.
+ * @deprecated Use defineClass(String, byte[], int, int)
+ */
+ protected final Class defineClass(byte[] classRep, int offset, int length)
+ throws ClassFormatError {
+ return null;
+ }
+
+ /**
+ * Constructs a new class from an array of bytes containing a class
+ * definition in class file format.
+ *
+ * @param className
+ * java.lang.String the name of the new class
+ * @param classRep
+ * byte[] a memory image of a class file
+ * @param offset
+ * int the offset into the classRep
+ * @param length
+ * int the length of the class file
+ */
+ protected final Class defineClass(String className, byte[] classRep,
+ int offset, int length) throws ClassFormatError {
+ return null;
+ }
+
+ /**
+ * Constructs a new class from an array of bytes containing a class
+ * definition in class file format and assigns the new class to the
+ * specified protection domain.
+ *
+ * @param className
+ * java.lang.String the name of the new class.
+ * @param classRep
+ * byte[] a memory image of a class file.
+ * @param offset
+ * int the offset into the classRep.
+ * @param length
+ * int the length of the class file.
+ * @param protectionDomain
+ * ProtectionDomain the protection domain this class should
+ * belongs to.
+ */
+ protected final Class defineClass(String className, byte[] classRep,
+ int offset, int length, ProtectionDomain protectionDomain)
+ throws java.lang.ClassFormatError {
+ return null;
+ }
+
+ /**
+ * Overridden by subclasses, by default throws ClassNotFoundException. This
+ * method is called by loadClass() after the parent ClassLoader has failed
+ * to find a loaded class of the same name.
+ *
+ * @return java.lang.Class the class or null.
+ * @param className
+ * String the name of the class to search for.
+ * @exception ClassNotFoundException
+ * always, unless overridden.
+ */
+ protected Class findClass(String className) throws ClassNotFoundException {
+ return null;
+ }
+
+ /**
+ * Attempts to find and return a class which has already been loaded by the
+ * virtual machine. Note that the class may not have been linked and the
+ * caller should call resolveClass() on the result if necessary.
+ *
+ * @return java.lang.Class the class or null.
+ * @param className
+ * String the name of the class to search for.
+ */
+ protected final Class findLoadedClass(String className) {
+ return null;
+ };
+
+ /**
+ * Attempts to load a class using the system class loader. Note that the
+ * class has already been been linked.
+ *
+ * @return java.lang.Class the class which was loaded.
+ * @param className
+ * String the name of the class to search for.
+ * @exception ClassNotFoundException
+ * if the class can not be found.
+ */
+ protected final Class findSystemClass(String className)
+ throws ClassNotFoundException {
+ return null;
+ }
+
+ /**
+ * Returns the specified ClassLoader's parent.
+ *
+ * @return java.lang.ClassLoader the class or null.
+ * @exception SecurityException
+ * if a security manager exists and it does not allow the
+ * parent loader to be retrieved.
+ */
+ public final ClassLoader getParent() {
+ return null;
+ }
+
+ /**
+ * Answers an URL which can be used to access the resource described by
+ * resName, using the class loader's resource lookup algorithm. The default
+ * behavior is just to return null.
+ *
+ * @return URL the location of the resource.
+ * @param resName
+ * String the name of the resource to find.
+ * @see Class#getResource
+ */
+ public URL getResource(String resName) {
+ return null;
+ }
+
+ /**
+ * Answers an Enumeration of URL which can be used to access the resources
+ * described by resName, using the class loader's resource lookup algorithm.
+ * The default behavior is just to return an empty Enumeration.
+ *
+ * @return Enumeration the locations of the resources.
+ * @param resName
+ * String the name of the resource to find.
+ */
+ public final Enumeration getResources(String resName) throws IOException {
+ return null;
+ }
+
+ /**
+ * Answers a stream on a resource found by looking up resName using the
+ * class loader's resource lookup algorithm. The default behavior is just to
+ * return null.
+ *
+ * @return InputStream a stream on the resource or null.
+ * @param resName
+ * String the name of the resource to find.
+ * @see Class#getResourceAsStream
+ */
+ public InputStream getResourceAsStream(String resName) {
+ return null;
+ }
+
+ /**
+ * Returns the system class loader. This is the parent for new ClassLoader
+ * instances, and is typically the class loader used to start the
+ * application. If a security manager is present, and the caller's class
+ * loader is not null and the caller's class loader is not the same as or an
+ * ancestor of the system class loader, then this method calls the security
+ * manager's checkPermission method with a
+ * RuntimePermission("getClassLoader") permission to ensure it's ok to
+ * access the system class loader. If not, a SecurityException will be
+ * thrown.
+ *
+ * @return java.lang.ClassLoader the system classLoader.
+ * @exception SecurityException
+ * if a security manager exists and it does not allow access
+ * to the system class loader.
+ */
+ public static ClassLoader getSystemClassLoader() {
+ return null;
+ }
+
+ /**
+ * Answers an URL specifing a resource which can be found by looking up
+ * resName using the system class loader's resource lookup algorithm.
+ *
+ * @return URL a URL specifying a system resource or null.
+ * @param resName
+ * String the name of the resource to find.
+ * @see Class#getResource
+ */
+ public static URL getSystemResource(String resName) {
+ return null;
+ }
+
+ /**
+ * Answers an Emuneration of URL containing all resources which can be found
+ * by looking up resName using the system class loader's resource lookup
+ * algorithm.
+ *
+ * @return Enumeration an Enumeration of URL containing the system resources
+ * @param resName
+ * String the name of the resource to find.
+ */
+ public static Enumeration getSystemResources(String resName)
+ throws IOException {
+ return null;
+ }
+
+ /**
+ * Answers a stream on a resource found by looking up resName using the
+ * system class loader's resource lookup algorithm. Basically, the contents
+ * of the java.class.path are searched in order, looking for a path which
+ * matches the specified resource.
+ *
+ * @return a stream on the resource or null.
+ * @param resName
+ * the name of the resource to find.
+ * @see Class#getResourceAsStream
+ */
+ public static InputStream getSystemResourceAsStream(String resName) {
+ return null;
+ }
+
+ /**
+ * Invoked by the Virtual Machine when resolving class references.
+ * Equivalent to loadClass(className, false);
+ *
+ * @return java.lang.Class the Class object.
+ * @param className
+ * String the name of the class to search for.
+ * @exception ClassNotFoundException
+ * If the class could not be found.
+ */
+ public Class loadClass(String className) throws ClassNotFoundException {
+ return null;
+ }
+
+ /**
+ * Loads the class with the specified name, optionally linking the class
+ * after load. Steps are: 1) Call findLoadedClass(className) to determine if
+ * class is loaded 2) Call loadClass(className, resolveClass) on the parent
+ * loader. 3) Call findClass(className) to find the class
+ *
+ * @return java.lang.Class the Class object.
+ * @param className
+ * String the name of the class to search for.
+ * @param resolveClass
+ * boolean indicates if class should be resolved after loading.
+ * @exception ClassNotFoundException
+ * If the class could not be found.
+ */
+ protected Class loadClass(String className, boolean resolveClass)
+ throws ClassNotFoundException {
+ return null;
+ }
+
+ /**
+ * Forces a class to be linked (initialized). If the class has already been
+ * linked this operation has no effect.
+ *
+ * @param clazz
+ * Class the Class to link.
+ * @exception NullPointerException
+ * if clazz is null.
+ * @see Class#getResource
+ */
+ protected final void resolveClass(Class clazz) {
+ return;
+ }
+
+ /**
+ * This method must be provided by the vm vendor, as it is used by other
+ * provided class implementations in this package. A sample implementation
+ * of this method is provided by the reference implementation. This method
+ * is used by SecurityManager.classLoaderDepth(), currentClassLoader() and
+ * currentLoadedClass(). Answers true if the receiver is a system class
+ * loader.
+ * <p>
+ * Note that this method has package visibility only. It is defined here to
+ * avoid the security manager check in getSystemClassLoader, which would be
+ * required to implement this method anywhere else.
+ *
+ * @return boolean true if the receiver is a system class loader
+ * @see Class#getClassLoaderImpl()
+ */
+ final boolean isSystemClassLoader() {
+ return false;
+ }
+
+ /**
+ * Answers true if the receiver is ancestor of another class loader.
+ * <p>
+ * Note that this method has package visibility only. It is defined here to
+ * avoid the security manager check in getParent, which would be required to
+ * implement this method anywhere else.
+ *
+ * @param child
+ * ClassLoader, a child candidate
+ * @return boolean true if the receiver is ancestor of the parameter
+ */
+ final boolean isAncestorOf(ClassLoader child) {
+ return false;
+ }
+
+ /**
+ * Answers an URL which can be used to access the resource
+ * described by resName, using the class loader's resource lookup
+ * algorithm. The default behavior is just to return null.
+ * This should be implemented by a ClassLoader.
+ *
+ * @return URL
+ * the location of the resource.
+ * @param resName String
+ * the name of the resource to find.
+ */
+ protected URL findResource(String resName) {
+ return null;
+ }
+
+ /**
+ * Answers an Enumeration of URL which can be used to access the resources
+ * described by resName, using the class loader's resource lookup
+ * algorithm. The default behavior is just to return an empty Enumeration.
+ *
+ * @param resName String
+ * the name of the resource to find.
+
+ * @return Enumeration
+ * the locations of the resources.
+ *
+ * @throws IOException when an error occurs
+ */
+ protected Enumeration findResources(String resName) throws IOException {
+ return null;
+ }
+
+ /**
+ * Answers the absolute path of the file containing the library associated
+ * with the given name, or null. If null is answered, the system searches
+ * the directories specified by the system property "java.library.path".
+ *
+ * @return String the library file name or null.
+ * @param libName
+ * String the name of the library to find.
+ */
+ protected String findLibrary(String libName) {
+ return null;
+ }
+
+ /**
+ * Attempt to locate the requested package. If no package information can be
+ * located, null is returned.
+ *
+ * @param name
+ * The name of the package to find
+ * @return The package requested, or null
+ */
+ protected Package getPackage(String name) {
+ return null;
+ }
+
+ /**
+ * Return all the packages known to this class loader.
+ *
+ * @return All the packages known to this classloader
+ */
+ protected Package[] getPackages() {
+ return null;
+ }
+
+ /**
+ * Define a new Package using the specified information.
+ *
+ * @param name
+ * The name of the package
+ * @param specTitle
+ * The title of the specification for the Package
+ * @param specVersion
+ * The version of the specification for the Package
+ * @param specVendor
+ * The vendor of the specification for the Package
+ * @param implTitle
+ * The implementation title of the Package
+ * @param implVersion
+ * The implementation version of the Package
+ * @param implVendor
+ * The specification vendor of the Package
+ * @return The Package created
+ * @exception IllegalArgumentException
+ * if the Package already exists
+ */
+ protected Package definePackage(String name, String specTitle,
+ String specVersion, String specVendor, String implTitle,
+ String implVersion, String implVendor, URL sealBase)
+ throws IllegalArgumentException {
+ return null;
+ }
+
+ /**
+ * Gets the signers of a class.
+ *
+ * @param c
+ * The Class object
+ * @return signers The signers for the class
+ */
+ final Object[] getSigners(Class c) {
+ return null;
+ }
+
+ /**
+ * Sets the signers of a class.
+ *
+ * @param c
+ * The Class object
+ * @param signers
+ * The signers for the class
+ */
+ protected final void setSigners(Class c, Object[] signers) {
+ return;
+ }
+
+ /**
+ * This must be provided by the vm vendor. It is used by
+ * SecurityManager.checkMemberAccess() with depth = 3. Note that
+ * checkMemberAccess() assumes the following stack when called. <code>
+ * <user code> <- want this class <br>
+ * Class.getDeclared*(); <br>
+ * Class.checkMemberAccess(); <br>
+ * SecurityManager.checkMemberAccess(); <- current frame <br>
+ * </code> Returns the ClassLoader of the method (including natives) at the
+ * specified depth on the stack of the calling thread. Frames representing
+ * the VM implementation of java.lang.reflect are not included in the list.
+ * Notes:
+ * <ul>
+ * <li>This method operates on the defining classes of methods on stack.
+ * NOT the classes of receivers.</li>
+ * <li>The item at depth zero is the caller of this method</li>
+ * </ul>
+ *
+ * @param depth
+ * the stack depth of the requested ClassLoader
+ * @return the ClassLoader at the specified depth
+ */
+ static final ClassLoader getStackClassLoader(int depth) {
+ return null;
+ };
+
+ /**
+ * This method must be included, as it is used by System.load(),
+ * System.loadLibrary(). The reference implementation of this method uses
+ * the getStackClassLoader() method. Returns the ClassLoader of the method
+ * that called the caller. i.e. A.x() calls B.y() calls callerClassLoader(),
+ * A's ClassLoader will be returned. Returns null for the bootstrap
+ * ClassLoader.
+ *
+ * @return a ClassLoader or null for the bootstrap ClassLoader
+ */
+ static ClassLoader callerClassLoader() {
+ return null;
+ }
+
+ /**
+ * This method must be provided by the vm vendor, as it is called by
+ * java.lang.System.loadLibrary(). System.loadLibrary() cannot call
+ * Runtime.loadLibrary() because this method loads the library using the
+ * ClassLoader of the calling method. Loads and links the library specified
+ * by the argument.
+ *
+ * @param libName
+ * the name of the library to load
+ * @param loader
+ * the classloader in which to load the library
+ * @exception UnsatisfiedLinkError
+ * if the library could not be loaded
+ * @exception SecurityException
+ * if the library was not allowed to be loaded
+ */
+ static void loadLibraryWithClassLoader(String libName, ClassLoader loader) {
+ return;
+ }
+
+ /**
+ * This method must be provided by the vm vendor, as it is called by
+ * java.lang.System.load(). System.load() cannot call Runtime.load() because
+ * the library is loaded using the ClassLoader of the calling method. Loads
+ * and links the library specified by the argument. No security check is
+ * done.
+ *
+ * @param libName
+ * the name of the library to load
+ * @param loader
+ * the classloader in which to load the library
+ * @param libraryPath
+ * the library path to search, or null
+ * @exception UnsatisfiedLinkError
+ * if the library could not be loaded
+ */
+ static void loadLibraryWithPath(String libName, ClassLoader loader,
+ String libraryPath) {
+ return;
+ }
+
+ /**
+ * Sets the assertion status of a class.
+ *
+ * @param cname
+ * Class name
+ * @param enable
+ * Enable or disable assertion
+ */
+ public void setClassAssertionStatus(String cname, boolean enable) {
+ return;
+ }
+
+ /**
+ * Sets the assertion status of a package.
+ *
+ * @param pname
+ * Package name
+ * @param enable
+ * Enable or disable assertion
+ */
+ public void setPackageAssertionStatus(String pname, boolean enable) {
+ return;
+ }
+
+ /**
+ * Sets the default assertion status of a classloader
+ *
+ * @param enable
+ * Enable or disable assertion
+ */
+ public void setDefaultAssertionStatus(boolean enable) {
+ return;
+ }
+
+ /**
+ * Clears the default, package and class assertion status of a classloader
+ *
+ */
+ public void clearAssertionStatus() {
+ return;
+ }
+
+ /**
+ * Answers the assertion status of the named class Returns the assertion
+ * status of the class or nested class if it has been set. Otherwise returns
+ * the assertion status of its package or superpackage if that has been set.
+ * Otherwise returns the default assertion status. Returns 1 for enabled and
+ * 0 for disabled.
+ *
+ * @return int the assertion status.
+ * @param cname
+ * String the name of class.
+ */
+ boolean getClassAssertionStatus(String cname) {
+ return false;
+ }
+
+ /**
+ * Answers the assertion status of the named package Returns the assertion
+ * status of the named package or superpackage if that has been set.
+ * Otherwise returns the default assertion status. Returns 1 for enabled and
+ * 0 for disabled.
+ *
+ * @return int the assertion status.
+ * @param pname
+ * String the name of package.
+ */
+ boolean getPackageAssertionStatus(String pname) {
+ return false;
+ }
+
+ /**
+ * Answers the default assertion status
+ *
+ * @return boolean the default assertion status.
+ */
+ boolean getDefaultAssertionStatus() {
+ return false;
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java?rev=390443&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java Fri Mar 31 07:34:47 2006
@@ -0,0 +1,81 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+/**
+ * This class must be implemented by the vm vendor. This class is a placeholder
+ * for environments which explicitely manage the action of a "Just In Time"
+ * compiler.
+ *
+ * @see Cloneable
+ */
+public final class Compiler {
+
+ /**
+ * Low level interface to the JIT compiler. Can return any object, or null
+ * if no JIT compiler is available.
+ *
+ * @return Object result of executing command
+ * @param cmd
+ * Object a command for the JIT compiler
+ */
+ public static Object command(Object cmd) {
+ return null;
+ }
+
+ /**
+ * Compiles the class using the JIT compiler. Answers true if the
+ * compilation was successful, or false if it failed or there was no JIT
+ * compiler available.
+ *
+ * @return boolean indicating compilation success
+ * @param classToCompile
+ * java.lang.Class the class to JIT compile
+ */
+ public static boolean compileClass(Class classToCompile) {
+ return false;
+ }
+
+ /**
+ * Compiles all classes whose name matches the argument using the JIT
+ * compiler. Answers true if the compilation was successful, or false if it
+ * failed or there was no JIT compiler available.
+ *
+ * @return boolean indicating compilation success
+ * @param nameRoot
+ * String the string to match against class names
+ */
+ public static boolean compileClasses(String nameRoot) {
+ return false;
+ }
+
+ /**
+ * Disable the JIT compiler
+ *
+ */
+ public static void disable() {
+ return;
+ };
+
+ /**
+ * Disable the JIT compiler
+ *
+ */
+ public static void enable() {
+ return;
+ };
+
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java?rev=390443&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java Fri Mar 31 07:34:47 2006
@@ -0,0 +1,232 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang;
+
+/**
+ * This class must be implemented by the vm vendor. Object is the root of the
+ * java class hierarchy. All non-base types respond to the messages defined in
+ * this class.
+ *
+ */
+
+public class Object {
+
+ /**
+ * Constructs a new instance of this class.
+ *
+ */
+ public Object() {
+ }
+
+ /**
+ * Answers a new instance of the same class as the receiver, whose slots
+ * have been filled in with the values in the slots of the receiver.
+ * <p>
+ * Classes which wish to support cloning must specify that they implement
+ * the Cloneable interface, since the implementation checks for this.
+ *
+ * @return Object a shallow copy of this object.
+ * @exception CloneNotSupportedException
+ * if the receiver's class does not implement the interface
+ * Cloneable.
+ */
+ protected Object clone() throws CloneNotSupportedException {
+ return null;
+ };
+
+ /**
+ * Compares the argument to the receiver, and answers true if they represent
+ * the <em>same</em> object using a class specific comparison. The
+ * implementation in Object answers true only if the argument is the exact
+ * same object as the receiver (==).
+ *
+ * @param o
+ * Object the object to compare with this object.
+ * @return boolean <code>true</code> if the object is the same as this
+ * object <code>false</code> if it is different from this object.
+ * @see #hashCode
+ */
+ public boolean equals(Object o) {
+ return false;
+ }
+
+ /**
+ * Called by the virtual machine when there are no longer any (non-weak)
+ * references to the receiver. Subclasses can use this facility to guarantee
+ * that any associated resources are cleaned up before the receiver is
+ * garbage collected. Uncaught exceptions which are thrown during the
+ * running of the method cause it to terminate immediately, but are
+ * otherwise ignored.
+ * <p>
+ * Note: The virtual machine assumes that the implementation in class Object
+ * is empty.
+ *
+ * @exception Throwable
+ * The virtual machine ignores any exceptions which are
+ * thrown during finalization.
+ */
+
+ protected void finalize() throws Throwable {
+ }
+
+ /**
+ * Answers the unique instance of java.lang.Class which represents the class
+ * of the receiver.
+ *
+ * @return Class the receiver's Class
+ */
+ public final Class getClass() {
+ return null;
+ };
+
+ /**
+ * Answers an integer hash code for the receiver. Any two objects which
+ * answer <code>true</code> when passed to <code>.equals</code> must
+ * answer the same value for this method.
+ *
+ * @return int the receiver's hash.
+ * @see #equals
+ */
+ public int hashCode() {
+ return 0;
+ };
+
+ /**
+ * Causes one thread which is <code>wait</code> ing on the receiver to be
+ * made ready to run. This does not guarantee that the thread will
+ * immediately run. The method can only be invoked by a thread which owns
+ * the receiver's monitor.
+ *
+ * @see #notifyAll
+ * @see #wait()
+ * @see #wait(long)
+ * @see #wait(long,int)
+ * @see java.lang.Thread
+ */
+ public final void notify() {
+ return;
+ };
+
+ /**
+ * Causes all threads which are <code>wait</code> ing on the receiver to
+ * be made ready to run. The threads are scheduled according to their
+ * priorities as specified in class Thread. Between any two threads of the
+ * same priority the one which waited first will be the first thread that
+ * runs after being notified. The method can only be invoked by a thread
+ * which owns the receiver's monitor.
+ *
+ * @see #notify
+ * @see #wait()
+ * @see #wait(long)
+ * @see #wait(long,int)
+ * @see java.lang.Thread
+ */
+ public final void notifyAll() {
+ return;
+ };
+
+ /**
+ * Answers a string containing a concise, human-readable description of the
+ * receiver.
+ *
+ * @return String a printable representation for the receiver.
+ */
+ public String toString() {
+ return null;
+ }
+
+ /**
+ * Causes the thread which sent this message to be made not ready to run
+ * pending some change in the receiver (as indicated by <code>notify</code>
+ * or <code>notifyAll</code>). The method can only be invoked by a thread
+ * which owns the receiver's monitor. A waiting thread can be sent
+ * <code>interrupt()</code> to cause it to prematurely stop waiting, so
+ * senders of wait should check that the condition they were waiting for has
+ * been met.
+ * <p>
+ * When the thread waits, it gives up ownership of the receiver's monitor.
+ * When it is notified (or interrupted) it re-acquires the monitor before it
+ * starts running.
+ *
+ * @exception InterruptedException
+ * to interrupt the wait.
+ * @see Thread#interrupt
+ * @see #notify
+ * @see #notifyAll
+ * @see #wait(long)
+ * @see #wait(long,int)
+ * @see java.lang.Thread
+ */
+ public final void wait() throws InterruptedException {
+ return;
+ }
+
+ /**
+ * Causes the thread which sent this message to be made not ready to run
+ * either pending some change in the receiver (as indicated by
+ * <code>notify</code> or <code>notifyAll</code>) or the expiration of
+ * the timeout. The method can only be invoked by a thread which owns the
+ * receiver's monitor. A waiting thread can be sent <code>interrupt()</code>
+ * to cause it to prematurely stop waiting, so senders of wait should check
+ * that the condition they were waiting for has been met.
+ * <p>
+ * When the thread waits, it gives up ownership of the receiver's monitor.
+ * When it is notified (or interrupted) it re-acquires the monitor before it
+ * starts running.
+ *
+ * @param time
+ * long The maximum time to wait in milliseconds.
+ * @exception InterruptedException
+ * to interrupt the wait.
+ * @see #notify
+ * @see #notifyAll
+ * @see #wait()
+ * @see #wait(long,int)
+ * @see java.lang.Thread
+ */
+ public final void wait(long time) throws InterruptedException {
+ return;
+ }
+
+ /**
+ * Causes the thread which sent this message to be made not ready to run
+ * either pending some change in the receiver (as indicated by
+ * <code>notify</code> or <code>notifyAll</code>) or the expiration of
+ * the timeout. The method can only be invoked by a thread which owns the
+ * receiver's monitor. A waiting thread can be sent <code>interrupt()</code>
+ * to cause it to prematurely stop waiting, so senders of wait should check
+ * that the condition they were waiting for has been met.
+ * <p>
+ * When the thread waits, it gives up ownership of the receiver's monitor.
+ * When it is notified (or interrupted) it re-acquires the monitor before it
+ * starts running.
+ *
+ * @param time
+ * long The maximum time to wait in milliseconds.
+ * @param frac
+ * int The fraction of a mSec to wait, specified in nano seconds.
+ * @exception InterruptedException
+ * to interrupt the wait.
+ * @see #notify
+ * @see #notifyAll
+ * @see #wait()
+ * @see #wait(long)
+ * @see java.lang.Thread
+ */
+ public final void wait(long time, int frac) throws InterruptedException {
+ return;
+ };
+}