harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r350181 [54/198] - in /incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core: ./ depends/ depends/files/ depends/jars/ depends/libs/ depends/libs/linux.IA32/ depends/libs/win.IA32/ depends/oss/ depends/oss/linux.IA32/ depends/oss/win.I...
Date Thu, 01 Dec 2005 06:04:00 GMT
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Class.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Class.java?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Class.java (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Class.java Wed Nov 30 21:29:27 2005
@@ -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 {
+	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/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/ClassLoader.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/ClassLoader.java?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/ClassLoader.java (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/ClassLoader.java Wed Nov 30 21:29:27 2005
@@ -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/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Compiler.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Compiler.java?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Compiler.java (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Compiler.java Wed Nov 30 21:29:27 2005
@@ -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/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Object.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Object.java?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Object.java (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Object.java Wed Nov 30 21:29:27 2005
@@ -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;
+	};
+}

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Package.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Package.java?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Package.java (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Package.java Wed Nov 30 21:29:27 2005
@@ -0,0 +1,192 @@
+/* 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.net.URL;
+
+
+/**
+ * This class must be implemented by the vm vendor.
+ * 
+ * An instance of class Package contains information about a Java package. This
+ * includes implementation and specification versions. Typically this
+ * information is retrieved from the manifest.
+ * <p>
+ * Packages are managed by class loaders. All classes loaded by the same loader
+ * from the same package share a Package instance.
+ * 
+ * 
+ * @see java.lang.ClassLoader
+ */
+public class Package {
+
+	/**
+	 * Return the title of the implementation of this package, or null if this
+	 * is unknown. The format of this string is unspecified.
+	 * 
+	 * @return The implementation title, or null
+	 */
+	public String getImplementationTitle() {
+		return null;
+	}
+
+	/**
+	 * Return the name of the vendor or organization that provided this
+	 * implementation of the package, or null if this is unknown. The format of
+	 * this string is unspecified.
+	 * 
+	 * @return The implementation vendor name, or null
+	 */
+	public String getImplementationVendor() {
+		return null;
+	}
+
+	/**
+	 * Return the version of the implementation of this package, or null if this
+	 * is unknown. The format of this string is unspecified.
+	 * 
+	 * @return The implementation version, or null
+	 */
+	public String getImplementationVersion() {
+		return null;
+	}
+
+	/**
+	 * Return the name of this package in the standard dot notation; for
+	 * example: "java.lang".
+	 * 
+	 * @return The name of this package
+	 */
+	public String getName() {
+		return null;
+	}
+
+	/**
+	 * Attempt to locate the requested package in the caller's class loader. If
+	 * no package information can be located, null is returned.
+	 * 
+	 * @param packageName
+	 *            The name of the package to find
+	 * @return The package requested, or null
+	 * 
+	 * @see ClassLoader#getPackage
+	 */
+	public static Package getPackage(String packageName) {
+		return null;
+	}
+
+	/**
+	 * Return all the packages known to the caller's class loader.
+	 * 
+	 * @return All the packages known to the caller's classloader
+	 * 
+	 * @see ClassLoader#getPackages
+	 */
+	public static Package[] getPackages() {
+		return null;
+	}
+
+	/**
+	 * Return the title of the specification this package implements, or null if
+	 * this is unknown.
+	 * 
+	 * @return The specification title, or null
+	 */
+	public String getSpecificationTitle() {
+		return null;
+	}
+
+	/**
+	 * Return the name of the vendor or organization that owns and maintains the
+	 * specification this package implements, or null if this is unknown.
+	 * 
+	 * @return The specification vendor name, or null
+	 */
+	public String getSpecificationVendor() {
+		return null;
+	}
+
+	/**
+	 * Return the version of the specification this package implements, or null
+	 * if this is unknown. The version string is a sequence of non-negative
+	 * integers separated by dots; for example: "1.2.3".
+	 * 
+	 * @return The specification version string, or null
+	 */
+	public String getSpecificationVersion() {
+		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 the receiver's hash
+	 */
+	public int hashCode() {
+		return 0;
+	}
+
+	/**
+	 * Return true if this package's specification version is compatible with
+	 * the specified version string. Version strings are compared by comparing
+	 * each dot separated part of the version as an integer.
+	 * 
+	 * @param version
+	 *            The version string to compare against
+	 * @return true if the package versions are compatible, false otherwise
+	 * 
+	 * @throws NumberFormatException
+	 *             if the package's version string or the one provided is not in
+	 *             the correct format
+	 */
+	public boolean isCompatibleWith(String version)
+			throws NumberFormatException {
+		return false;
+	}
+
+	/**
+	 * Return true if this package is sealed, false otherwise.
+	 * 
+	 * @return true if this package is sealed, false otherwise
+	 */
+	public boolean isSealed() {
+		return false;
+	}
+
+	/**
+	 * Return true if this package is sealed with respect to the specified URL,
+	 * false otherwise.
+	 * 
+	 * @param url
+	 *            the URL to test
+	 * @return true if this package is sealed, false otherwise
+	 */
+	public boolean isSealed(URL url) {
+		return false;
+	}
+
+	/**
+	 * Answers a string containing a concise, human-readable description of the
+	 * receiver.
+	 * 
+	 * @return a printable representation for the receiver.
+	 */
+	public String toString() {
+		return null;
+	}
+}

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Runtime.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Runtime.java?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Runtime.java (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/Runtime.java Wed Nov 30 21:29:27 2005
@@ -0,0 +1,322 @@
+/* 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.File;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+
+/**
+ * This class, with the exception of the exec() APIs, must be implemented by the
+ * vm vendor. The exec() APIs must first do any required security checks, and
+ * then call com.ibm.oti.lang.SystemProcess.create(). The Runtime interface.
+ */
+
+public class Runtime {
+	/**
+	 * Execute progAray[0] in a seperate platform process The new process
+	 * inherits the environment of the caller.
+	 * 
+	 * @param progArray
+	 *            the array containing the program to execute as well as any
+	 *            arguments to the program.
+	 * @exception java.io.IOException
+	 *                if the program cannot be executed
+	 * @exception SecurityException
+	 *                if the current SecurityManager disallows program execution
+	 * @see SecurityManager#checkExec
+	 */
+	public Process exec(String[] progArray) throws java.io.IOException {
+		return null;
+	}
+
+	/**
+	 * Execute progArray[0] in a seperate platform process The new process uses
+	 * the environment provided in envp
+	 * 
+	 * @param progArray
+	 *            the array containing the program to execute a well as any
+	 *            arguments to the program.
+	 * @param envp
+	 *            the array containing the environment to start the new process
+	 *            in.
+	 * @exception java.io.IOException
+	 *                if the program cannot be executed
+	 * @exception SecurityException
+	 *                if the current SecurityManager disallows program execution
+	 * @see SecurityManager#checkExec
+	 */
+	public Process exec(String[] progArray, String[] envp)
+			throws java.io.IOException {
+		return null;
+	}
+
+	/**
+	 * Execute progArray[0] in a seperate platform process The new process uses
+	 * the environment provided in envp
+	 * 
+	 * @param progArray
+	 *            the array containing the program to execute a well as any
+	 *            arguments to the program.
+	 * @param envp
+	 *            the array containing the environment to start the new process
+	 *            in.
+	 * @exception java.io.IOException
+	 *                if the program cannot be executed
+	 * @exception SecurityException
+	 *                if the current SecurityManager disallows program execution
+	 * @see SecurityManager#checkExec
+	 */
+	public Process exec(String[] progArray, String[] envp, File directory)
+			throws java.io.IOException {
+		return null;
+	}
+
+	/**
+	 * Execute program in a seperate platform process The new process inherits
+	 * the environment of the caller.
+	 * 
+	 * @param prog
+	 *            the name of the program to execute
+	 * @exception java.io.IOException
+	 *                if the program cannot be executed
+	 * @exception SecurityException
+	 *                if the current SecurityManager disallows program execution
+	 * @see SecurityManager#checkExec
+	 */
+	public Process exec(String prog) throws java.io.IOException {
+		return null;
+	}
+
+	/**
+	 * Execute prog in a seperate platform process The new process uses the
+	 * environment provided in envp
+	 * 
+	 * @param prog
+	 *            the name of the program to execute
+	 * @param envp
+	 *            the array containing the environment to start the new process
+	 *            in.
+	 * @exception java.io.IOException
+	 *                if the program cannot be executed
+	 * @exception SecurityException
+	 *                if the current SecurityManager disallows program execution
+	 * @see SecurityManager#checkExec
+	 */
+	public Process exec(String prog, String[] envp) throws java.io.IOException {
+		return null;
+	}
+
+	/**
+	 * Execute prog in a seperate platform process The new process uses the
+	 * environment provided in envp
+	 * 
+	 * @param prog
+	 *            the name of the program to execute
+	 * @param envp
+	 *            the array containing the environment to start the new process
+	 *            in.
+	 * @param directory
+	 *            the initial directory for the subprocess, or null to use the
+	 *            directory of the current process
+	 * @exception java.io.IOException
+	 *                if the program cannot be executed
+	 * @exception SecurityException
+	 *                if the current SecurityManager disallows program execution
+	 * @see SecurityManager#checkExec
+	 */
+	public Process exec(String prog, String[] envp, File directory)
+			throws java.io.IOException {
+		return null;
+	}
+
+	/**
+	 * Causes the virtual machine to stop running, and the program to exit. If
+	 * runFinalizersOnExit(true) has been invoked, then all finalizers will be
+	 * run first.
+	 * 
+	 * @param code
+	 *            the return code.
+	 * @exception SecurityException
+	 *                if the running thread is not allowed to cause the vm to
+	 *                exit.
+	 * @see SecurityManager#checkExit
+	 */
+	public void exit(int code) {
+		return;
+	}
+
+	/**
+	 * Answers the amount of free memory resources which are available to the
+	 * running program.
+	 * 
+	 */
+	public long freeMemory() {
+		return 0L;
+	};
+
+	/**
+	 * Indicates to the virtual machine that it would be a good time to collect
+	 * available memory. Note that, this is a hint only.
+	 * 
+	 */
+	public void gc() {
+		return;
+	};
+
+	/**
+	 * Return the single Runtime instance
+	 * 
+	 */
+	public static Runtime getRuntime() {
+		return null;
+	}
+
+	/**
+	 * Loads and links the library specified by the argument.
+	 * 
+	 * @param pathName
+	 *            the absolute (ie: platform dependent) path to the library to
+	 *            load
+	 * @exception UnsatisfiedLinkError
+	 *                if the library could not be loaded
+	 * @exception SecurityException
+	 *                if the library was not allowed to be loaded
+	 */
+	public void load(String pathName) {
+		return;
+	}
+
+	/**
+	 * Loads and links the library specified by the argument.
+	 * 
+	 * @param libName
+	 *            the name of the library to load
+	 * @exception UnsatisfiedLinkError
+	 *                if the library could not be loaded
+	 * @exception SecurityException
+	 *                if the library was not allowed to be loaded
+	 */
+	public void loadLibrary(String libName) {
+		return;
+	}
+
+	/**
+	 * Provides a hint to the virtual machine that it would be useful to attempt
+	 * to perform any outstanding object finalizations.
+	 * 
+	 */
+	public void runFinalization() {
+		return;
+	};
+
+	/**
+	 * Ensure that, when the virtual machine is about to exit, all objects are
+	 * finalized. Note that all finalization which occurs when the system is
+	 * exiting is performed after all running threads have been terminated.
+	 * 
+	 * @param run
+	 *            true means finalize all on exit.
+	 * @deprecated This method is unsafe.
+	 */
+	public static void runFinalizersOnExit(boolean run) {
+		return;
+	};
+
+	/**
+	 * Answers the total amount of memory resources which is available to (or in
+	 * use by) the running program.
+	 * 
+	 */
+	public long totalMemory() {
+		return 0L;
+	};
+
+	public void traceInstructions(boolean enable) {
+		return;
+	}
+
+	public void traceMethodCalls(boolean enable) {
+		return;
+	}
+
+	/**
+	 * @deprecated Use InputStreamReader
+	 */
+	public InputStream getLocalizedInputStream(InputStream stream) {
+		return null;
+	}
+
+	/**
+	 * @deprecated Use OutputStreamWriter
+	 */
+	public OutputStream getLocalizedOutputStream(OutputStream stream) {
+		return null;
+	}
+
+	/**
+	 * Registers a new virtual-machine shutdown hook.
+	 * 
+	 * @param hook
+	 *            the hook (a Thread) to register
+	 */
+	public void addShutdownHook(Thread hook) {
+		return;
+	}
+
+	/**
+	 * De-registers a previously-registered virtual-machine shutdown hook.
+	 * 
+	 * @param hook
+	 *            the hook (a Thread) to de-register
+	 * @return true if the hook could be de-registered
+	 */
+	public boolean removeShutdownHook(Thread hook) {
+		return false;
+	}
+
+	/**
+	 * Causes the virtual machine to stop running, and the program to exit.
+	 * Finalizers will not be run first. Shutdown hooks will not be run.
+	 * 
+	 * @param code
+	 *            the return code.
+	 * @exception SecurityException
+	 *                if the running thread is not allowed to cause the vm to
+	 *                exit.
+	 * @see SecurityManager#checkExit
+	 */
+	public void halt(int code) {
+		return;
+	}
+
+	/**
+	 * Return the number of processors, always at least one.
+	 */
+	public int availableProcessors() {
+		return 0;
+	}
+
+	/**
+	 * Return the maximum memory that will be used by the virtual machine, or
+	 * Long.MAX_VALUE.
+	 */
+	public long maxMemory() {
+		return 0L;
+	}
+
+}

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/StackTraceElement.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/StackTraceElement.java?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/StackTraceElement.java (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/java-src/kernel/src/java/lang/StackTraceElement.java Wed Nov 30 21:29:27 2005
@@ -0,0 +1,198 @@
+/* Copyright 2002, 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.
+ */
+
+/*[INCLUDE-IF mJava14]*/
+package java.lang;
+
+/**
+ * An implementation of this class is provided, but the documented constructor
+ * can be used by the vm specific implementation to create instances.
+ * 
+ * StackTraceElement represents a stack frame.
+ * 
+ * @see Throwable#getStackTrace()
+ */
+public final class StackTraceElement implements java.io.Serializable {
+	static final long serialVersionUID = 6992337162326171013L;
+
+	String declaringClass, methodName, fileName;
+
+	int lineNumber;
+
+	/**
+	 * Create a StackTraceElement from the parameters.
+	 * 
+	 * @param cls
+	 *            The class name
+	 * @param method
+	 *            The method name
+	 * @param file
+	 *            The file name
+	 * @param line
+	 *            The line number
+	 */
+	StackTraceElement(String cls, String method, String file, int line) {
+		if (cls == null || method == null)
+			throw new NullPointerException();
+		declaringClass = cls;
+		methodName = method;
+		fileName = file;
+		lineNumber = line;
+	}
+
+	// prevent instantiation from java code - only the VM creates these
+	private StackTraceElement() {
+		// Empty
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (!(obj instanceof StackTraceElement))
+			return false;
+		StackTraceElement castObj = (StackTraceElement) obj;
+
+		// Unknown methods are never equal to anything (not strictly to spec,
+		// but spec does not allow null method/class names)
+		if ((methodName == null) || (castObj.methodName == null))
+			return false;
+
+		if (!getMethodName().equals(castObj.getMethodName()))
+			return false;
+		if (!getClassName().equals(castObj.getClassName()))
+			return false;
+		String localFileName = getFileName();
+		if (localFileName == null) {
+			if (castObj.getFileName() != null)
+				return false;
+		} else {
+			if (!localFileName.equals(castObj.getFileName()))
+				return false;
+		}
+		if (getLineNumber() != castObj.getLineNumber())
+			return false;
+
+		return true;
+	}
+
+	/**
+	 * Returns the full name (i.e. including the package) of the class where
+	 * this stack trace element is executing.
+	 * 
+	 * @return the fully qualified type name of the class where this stack trace
+	 *         element is executing.
+	 */
+	public String getClassName() {
+		return (declaringClass == null) ? "<unknown class>" : declaringClass;
+	}
+
+	/**
+	 * If available, returns the name of the file containing the Java code
+	 * source which was compiled into the class where this stack trace element
+	 * is executing.
+	 * 
+	 * @return if available, the name of the file containing the Java code
+	 *         source for the stack trace element's excuting class. If no such
+	 *         detail is available, a <code>null</code> value is returned.
+	 */
+	public String getFileName() {
+		return fileName;
+	}
+
+	/**
+	 * If available, returns the line number in the source for the class where
+	 * this stack trace element is executing.
+	 * 
+	 * @return if available, the line number in the source file for the class
+	 *         where this stack trace element is executing. If no such detail is
+	 *         available, a number &lt; <code>0</code>.
+	 */
+	public int getLineNumber() {
+		return lineNumber;
+	}
+
+	/**
+	 * Returns the name of the method where this stack trace element is
+	 * executing.
+	 * 
+	 * @return the name of the method where this stack trace element is
+	 *         executing.
+	 */
+	public String getMethodName() {
+		return (methodName == null) ? "<unknown method>" : methodName;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		// either both methodName and declaringClass are null, or neither are
+		// null
+		if (methodName == null)
+			return 0; // all unknown methods hash the same
+		// declaringClass never null if methodName is non-null
+		return methodName.hashCode() ^ declaringClass.hashCode();
+	}
+
+	/**
+	 * Returns <code>true</code> if the method name returned by
+	 * {@link #getMethodName()} is implemented as a native method.
+	 * 
+	 * @return if the method in which this stack trace element is executing is a
+	 *         native method
+	 */
+	public boolean isNativeMethod() {
+		return lineNumber == -2;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buf = new StringBuffer(80);
+
+		buf.append(getClassName());
+		buf.append('.');
+		buf.append(getMethodName());
+
+		if (isNativeMethod()) {
+			buf.append("(Native Method)");
+		} else {
+			String fName = getFileName();
+
+			if (fName == null) {
+				buf.append("(Unknown Source)");
+			} else {
+				int lineNum = getLineNumber();
+
+				buf.append('(');
+				buf.append(fName);
+				if (lineNum >= 0) {
+					buf.append(':');
+					buf.append(lineNum);
+				}
+				buf.append(')');
+			}
+		}
+		return buf.toString();
+	}
+}



Mime
View raw message