harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arc...@apache.org
Subject svn commit: r398726 [4/6] - in /incubator/harmony/enhanced/classlibadapter: ./ trunk/ trunk/bin/ trunk/modules/ trunk/modules/kernel/ trunk/modules/kernel/src/ trunk/modules/kernel/src/main/ trunk/modules/kernel/src/main/java/ trunk/modules/kernel/src/...
Date Mon, 01 May 2006 23:11:49 GMT
Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/Throwable.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/Throwable.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/Throwable.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/Throwable.java Mon May  1 16:11:39 2006
@@ -0,0 +1,363 @@
+/* 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.ObjectOutputStream;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+/**
+ * This class must be implemented by the vm vendor, or the reference
+ * implementation can be used if the documented natives are implemented.
+ * 
+ * This class is the superclass of all classes which can be thrown by the
+ * virtual machine. The two direct subclasses represent recoverable exceptions
+ * (Exception) and unrecoverable errors (Error). This class provides common
+ * methods for accessing a string message which provides extra information about
+ * the circumstances in which the throwable was created, and for filling in a
+ * walkback (i.e. a record of the call stack at a particular point in time)
+ * which can be printed later.
+ * 
+ * @see Error
+ * @see Exception
+ * @see RuntimeException
+ */
+public class Throwable implements java.io.Serializable {
+	private static final long serialVersionUID = -3042686055658047285L;
+
+    private VMThrowable vmState;  //wjw  required by jchevm:: _jc_bootstrap_classes
+
+	/**
+	 * The message provided when the exception was created.
+	 */
+	private String detailMessage;
+
+	/**
+	 * An object which describes the walkback. This field is stored by the
+	 * fillInStackTrace() native, and used by the getStackTraceImpl() native.
+	 */
+	private transient Object walkback;
+
+	/**
+	 * The cause of this Throwable. Null when there is no cause.
+	 */
+	private Throwable cause = this;
+
+	private StackTraceElement[] stackTrace = null;
+
+	/**
+	 * Constructs a new instance of this class with its walkback filled in.
+	 */
+	public Throwable() {
+		super();
+        //fixit -- is the below code correct?
+		fillInStackTrace();
+	}
+
+	/**
+	 * Constructs a new instance of this class with its walkback and message
+	 * filled in.
+	 * 
+	 * @param detailMessage
+	 *            String The detail message for the exception.
+	 */
+	public Throwable(String detailMessage) {
+		this();
+		this.detailMessage = detailMessage;
+	}
+
+	/**
+	 * Constructs a new instance of this class with its walkback, message and
+	 * cause filled in.
+	 * 
+	 * @param detailMessage
+	 *            String The detail message for the exception.
+	 * @param throwable
+	 *            The cause of this Throwable
+	 */
+	public Throwable(String detailMessage, Throwable throwable) {
+		this();
+		this.detailMessage = detailMessage;
+		cause = throwable;
+	}
+
+	/**
+	 * Constructs a new instance of this class with its walkback and cause
+	 * filled in.
+	 * 
+	 * @param throwable
+	 *            The cause of this Throwable
+	 */
+	public Throwable(Throwable throwable) {
+		this();
+		this.detailMessage = throwable == null ? null : throwable.toString();
+		cause = throwable;
+	}
+
+	/**
+	 * This native must be implemented to use the reference implementation of
+	 * this class.
+	 * 
+	 * Record in the receiver a walkback from the point where this message was
+	 * sent. The message is public so that code which catches a throwable and
+	 * then <em>re-throws</em> it can adjust the walkback to represent the
+	 * location where the exception was re-thrown.
+	 * 
+	 * @return the receiver
+	 */
+	//  this is a native instance method, wrong!  ---->public native Throwable fillInStackTrace();
+    public Throwable fillInStackTrace() 
+    {
+        Throwable thr = VMThrowable.fillInStackTrace(this);
+        return thr;
+    }
+
+	/**
+	 * Answers the extra information message which was provided when the
+	 * throwable was created. If no message was provided at creation time, then
+	 * answer null.
+	 * 
+	 * @return String The receiver's message.
+	 */
+	public String getMessage() {
+		return detailMessage;
+	}
+
+	/**
+	 * Answers the extra information message which was provided when the
+	 * throwable was created. If no message was provided at creation time, then
+	 * answer null. Subclasses may override this method to answer localized text
+	 * for the message.
+	 * 
+	 * @return String The receiver's message.
+	 */
+	public String getLocalizedMessage() {
+		return getMessage();
+	}
+
+	/**
+	 * This native must be implemented to use the reference implementation of
+	 * this class. The result of this native is cloned, and returned from the
+	 * public API getStackTrace().
+	 * 
+	 * Answers an array of StackTraceElement. Each StackTraceElement represents
+	 * a entry on the stack.
+	 * 
+	 * @return an array of StackTraceElement representing the stack
+	 */
+	//  this is a native instance method, wrong!  ----> private native StackTraceElement[] getStackTraceImpl();
+    private StackTraceElement[] getStackTraceImpl()
+    {
+        // fixit -- commented out the below line to get simple "hello world" demo to work
+        //VMThrowable.getStackTrace(this);
+        return null;
+    }
+	/**
+	 * Answers an array of StackTraceElement. Each StackTraceElement represents
+	 * a entry on the stack.
+	 * 
+	 * @return an array of StackTraceElement representing the stack
+	 */
+	public StackTraceElement[] getStackTrace() {
+		return (StackTraceElement[]) getInternalStackTrace().clone();
+	}
+
+	/**
+	 * Sets the array of StackTraceElements. Each StackTraceElement represents a
+	 * entry on the stack. A copy of this array will be returned by
+	 * getStackTrace() and printed by printStackTrace().
+	 * 
+	 * @param trace
+	 *            The array of StackTraceElement
+	 */
+	public void setStackTrace(StackTraceElement[] trace) {
+		StackTraceElement[] newTrace = (StackTraceElement[]) trace.clone();
+		for (int i = 0; i < newTrace.length; i++)
+			if (newTrace[i] == null)
+				throw new NullPointerException();
+		stackTrace = newTrace;
+	}
+
+	/**
+	 * Outputs a printable representation of the receiver's walkback on the
+	 * System.err stream.
+	 */
+	public void printStackTrace() {
+		printStackTrace(System.err);
+	}
+
+	/**
+	 * Count the number of duplicate stack frames, starting from
+	 * the end of the stack.
+	 * 
+	 * @param currentStack a stack to compare
+	 * @param parentStack a stack to compare
+	 *  
+	 * @return the number of duplicate stack frames.
+	 */
+	private static int countDuplicates(StackTraceElement[] currentStack,
+			StackTraceElement[] parentStack) {
+		int duplicates = 0;
+		int parentIndex = parentStack.length;
+		for (int i = currentStack.length; --i >= 0 && --parentIndex >= 0;) {
+			StackTraceElement parentFrame = parentStack[parentIndex];
+			if (parentFrame.equals(currentStack[i])) {
+				duplicates++;
+			} else {
+				break;
+			}
+		}
+		return duplicates;
+	}
+
+	/**
+	 * Answers an array of StackTraceElement. Each StackTraceElement represents
+	 * a entry on the stack. Cache the stack trace in the stackTrace field, returning
+	 * the cached field when it has already been initialized.
+	 *
+	 * @return an array of StackTraceElement representing the stack
+	 */
+	private StackTraceElement[] getInternalStackTrace() {
+		if (stackTrace == null)
+			stackTrace = getStackTraceImpl();
+		return stackTrace;
+	}
+
+	/**
+	 * Outputs a printable representation of the receiver's walkback on the
+	 * stream specified by the argument.
+	 * 
+	 * @param err
+	 *            PrintStream The stream to write the walkback on.
+	 */
+	public void printStackTrace(PrintStream err) {
+		err.println(toString());
+		// Don't use getStackTrace() as it calls clone()
+		// Get stackTrace, in case stackTrace is reassigned
+		StackTraceElement[] stack = getInternalStackTrace();
+		for (int i = 0; i < stack.length; i++)
+			err.println("\tat " + stack[i]);
+
+		StackTraceElement[] parentStack = stack;
+		Throwable throwable = getCause();
+		while (throwable != null) {
+			err.print("Caused by: ");
+			err.println(throwable);
+			StackTraceElement[] currentStack = throwable
+					.getInternalStackTrace();
+			int duplicates = countDuplicates(currentStack, parentStack);
+			for (int i = 0; i < currentStack.length - duplicates; i++)
+				err.println("\tat " + currentStack[i]);
+			if (duplicates > 0) {
+				err.println("\t... " + duplicates + " more");
+			}
+			parentStack = currentStack;
+			throwable = throwable.getCause();
+		}
+	}
+
+	/**
+	 * Outputs a printable representation of the receiver's walkback on the
+	 * writer specified by the argument.
+	 * 
+	 * @param err
+	 *            PrintWriter The writer to write the walkback on.
+	 */
+	public void printStackTrace(PrintWriter err) {
+		err.println(toString());
+		// Don't use getStackTrace() as it calls clone()
+		// Get stackTrace, in case stackTrace is reassigned
+		StackTraceElement[] stack = getInternalStackTrace();
+		for (int i = 0; i < stack.length; i++)
+			err.println("\tat " + stack[i]);
+
+		StackTraceElement[] parentStack = stack;
+		Throwable throwable = getCause();
+		while (throwable != null) {
+			err.print("Caused by: ");
+			err.println(throwable);
+			StackTraceElement[] currentStack = throwable
+					.getInternalStackTrace();
+			int duplicates = countDuplicates(currentStack, parentStack);
+			for (int i = 0; i < currentStack.length - duplicates; i++)
+				err.println("\tat " + currentStack[i]);
+			if (duplicates > 0) {
+				err.println("\t... " + duplicates + " more");
+			}
+			parentStack = currentStack;
+			throwable = throwable.getCause();
+		}
+	}
+
+	/**
+	 * Answers a string containing a concise, human-readable description of the
+	 * receiver.
+	 * 
+	 * @return String a printable representation for the receiver.
+	 */
+	public String toString() {
+		String msg = getLocalizedMessage();
+		String name = getClass().getName();
+		if (msg == null) {
+			return name;
+		}
+		return new StringBuffer(name.length() + 2 + msg.length()).append(name)
+				.append(": ").append(msg).toString();
+	}
+
+	/**
+	 * Initialize the cause of the receiver. The cause cannot be reassigned.
+	 * 
+	 * @param throwable
+	 *            The cause of this Throwable
+	 * 
+	 * @exception IllegalArgumentException
+	 *                when the cause is the receiver
+	 * @exception IllegalStateException
+	 *                when the cause has already been initialized
+	 * 
+	 * @return the receiver.
+	 */
+	public synchronized Throwable initCause(Throwable throwable) {
+		if (cause == this) {
+			if (throwable != this) {
+				cause = throwable;
+				return this;
+			}
+			throw new IllegalArgumentException("Cause cannot be the receiver");
+		}
+		throw new IllegalStateException("Cause already initialized");
+	}
+
+	/**
+	 * Answers the cause of this Throwable, or null if there is no cause.
+	 * 
+	 * @return Throwable The receiver's cause.
+	 */
+	public Throwable getCause() {
+		if (cause == this)
+			return null;
+		return cause;
+	}
+
+	private void writeObject(ObjectOutputStream s) throws IOException {
+		// ensure the stackTrace field is initialized
+		getInternalStackTrace();
+		s.defaultWriteObject();
+	}
+}
+

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/Throwable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClass.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClass.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClass.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClass.java Mon May  1 16:11:39 2006
@@ -0,0 +1,63 @@
+/* Copyright 1998, 2006 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.lang.reflect.*;
+
+public class VMClass 
+{
+    // VMClass was created by looking at the native methods contained in Apache JCHEVM
+    static public final native Class forName(String ss, boolean bb, ClassLoader cl)
+        throws java.lang.ClassNotFoundException;
+
+    static public final native ClassLoader getClassLoader(Class cl);
+
+    static public final native Class getComponentType(Class cl);
+
+    static public final native Class[] getDeclaredClasses(Class cl, boolean bb);
+
+    static public final native Constructor[] getDeclaredConstructors(Class cl, boolean bb);
+
+    static public final native Field[] getDeclaredFields(Class cl, boolean bl);
+
+    static public final native Method[] getDeclaredMethods(Class cl, boolean bl);
+
+    static public final native Class getDeclaringClass(Class cl);
+
+    static public final native Class[] getInterfaces(Class cl);
+
+    static public final native int getModifiers(Class cl, boolean bb);
+
+    static public final native String getName(Class cl);
+
+    static public final native Class getSuperclass(Class cl);
+
+    static public final native boolean isArray(Class cl);
+
+    static public final native boolean isAssignableFrom(Class cl, Class cl2);
+
+    static public final native boolean isInstance(Class cl, Object obj);
+
+    static public final native boolean isInterface(Class cl);
+
+    static public final native boolean isPrimitive(Class cl);
+
+    static public final native void throwException(Throwable thr);
+
+
+
+
+    
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClassLoader.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClassLoader.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClassLoader.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClassLoader.java Mon May  1 16:11:39 2006
@@ -0,0 +1,34 @@
+/* Copyright 1998, 2006 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.security.ProtectionDomain;
+
+public class VMClassLoader 
+{
+    // VMClassLoader was created by looking at the native methods contained in Apache JCHEVM
+    static public final native Class defineClass(ClassLoader cl,
+       String ss, byte[] ba, int i1, int i2, ProtectionDomain pd) throws ClassFormatError;
+
+    static public final native Class getPrimitiveClass(char cc);
+
+    static public final native Class loadClass(String ss, boolean bb)
+       throws java.lang.ClassNotFoundException;
+
+    static public native Class findLoadedClass(ClassLoader cl, String ss);
+
+    static public final native void resolveClass(Class cl);
+
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMClassLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMCompiler.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMCompiler.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMCompiler.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMCompiler.java Mon May  1 16:11:39 2006
@@ -0,0 +1,25 @@
+/* Copyright 1998, 2006 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;
+
+public class VMCompiler 
+{
+    // VMCompiler was created by looking at the native methods contained in Apache JCHEVM
+    static public final native VMThrowable fillInStackTrace(Throwable thr);
+
+    public final native StackTraceElement[] getStackTrace(Throwable thr);
+
+
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMCompiler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMObject.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMObject.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMObject.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMObject.java Mon May  1 16:11:39 2006
@@ -0,0 +1,33 @@
+/* Copyright 1998, 2006 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;
+
+public class VMObject 
+{
+    //VMObject was created by looking at the native methods contained in Apache JCHEVM
+    static public final native Object clone(Cloneable clo);
+
+    static public final native Class getClass(Object obj);
+
+    static public final native void wait(Object obj, long time1, int time2)
+      throws java.lang.IllegalMonitorStateException,
+        java.lang.InterruptedException;
+
+    static public final native void notify(Object obj)
+        throws java.lang.IllegalMonitorStateException;
+
+    static public final native void notifyAll(Object obj)
+        throws java.lang.IllegalMonitorStateException;
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMPackage.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMPackage.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMPackage.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMPackage.java Mon May  1 16:11:39 2006
@@ -0,0 +1,17 @@
+/* Copyright 1998, 2006 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;
+
+//fixit  -- apparently VMPackage is not involved in simple "hello world" demo

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMPackage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMRuntime.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMRuntime.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMRuntime.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMRuntime.java Mon May  1 16:11:39 2006
@@ -0,0 +1,46 @@
+/* Copyright 1998, 2006 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;
+
+public class VMRuntime 
+{
+    //this class was created by looking at the native methods contained in Apache JCHEVM
+    static public final native int availableProcessors();
+
+    static public final native void exit(int code);
+
+    static public final native long freeMemory();
+
+    static public final native void gc();
+
+    static public final native String mapLibraryName(String ss);
+
+    static public final native long maxMemory();
+
+    static public final native int nativeLoad(String ss, ClassLoader cl);
+
+    static public final native void runFinalization();
+
+    static public final native void runFinalizationForExit();
+
+    static public final native void runFinalizersOnExit(boolean bb);
+
+    static public final native long totalMemory();
+
+    static public final native void traceInstructions(boolean bb);
+
+    static public final native void traceMethodCalls(boolean bb);
+
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMRuntime.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMStackTraceElement.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMStackTraceElement.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMStackTraceElement.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMStackTraceElement.java Mon May  1 16:11:39 2006
@@ -0,0 +1,21 @@
+/* Copyright 1998, 2006 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;
+
+
+public class VMStackTraceElement 
+{
+    //fixit -- apparently not needed for simple "hello world" demo
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMStackTraceElement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMString.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMString.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMString.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMString.java Mon May  1 16:11:39 2006
@@ -0,0 +1,20 @@
+/* Copyright 1998, 2006 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;
+
+public class VMString 
+{
+    // fixit -- apparently not needed for simple "hello world" demo
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMString.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMSystem.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMSystem.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMSystem.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMSystem.java Mon May  1 16:11:39 2006
@@ -0,0 +1,36 @@
+/* Copyright 1998, 2006 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.*;
+
+public class VMSystem 
+{
+    //VMSystem was created by looking at Apache JCHEVM native methods
+    // not necessary for simple "hello world" demo --> static final native void arraycopy(Object obj, int ii, Object obj2, int jj, int kk);
+
+    static public final native int identityHashCode(Object obj);
+
+    static public final native void setIn(InputStream is);
+
+    static public final native void setOut(PrintStream ps);
+
+    static public final native void setErr(PrintStream ps);
+
+    public static final native long currentTimeMillis();
+
+    static public native String getenv();
+
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMSystem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThread.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThread.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThread.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThread.java Mon May  1 16:11:39 2006
@@ -0,0 +1,61 @@
+/* Copyright 1998, 2006 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;
+
+class VMThread 
+{
+    //VMThread was created by looking at the native methods for Apache JCHEVM
+    VMThread(Thread t1) 
+    {
+        this.thread = t1;
+        //the below is a diagnostic/debug aid (you can set breakpoint in JCHEVM where this string object is created
+        String s1 = "VMThread.<init>(Thread) is not fully implemented";
+    }
+    VMThread()
+    {
+        //the below is a diagnostic/debug aid (you can set breakpoint in JCHEVM where this string object is created
+        String s1 = "VMThread.<init>() is not fully implemented";
+    }
+    Thread thread;
+    Object vmdata;
+    void run() 
+    {
+        //the below is a diagnostic/debug aid (you can set breakpoint in JCHEVM where this string object is created
+        String s1 = "NNNNNNNNNNNNNNNN VMThread.run() has been called";
+        thread.run();
+    }
+    final native int countStackFrames();
+
+    static final native Thread currentThread();
+
+    final native void interrupt();
+
+    static final native boolean interrupted();
+
+    final native boolean isInterrupted();
+
+    final native void nativeSetPriority(int pri);
+
+    final native void nativeStop(Throwable thr);
+
+    final native void resume();
+
+    final native void start(long stacklength);
+
+    final native void suspend();
+
+    static final native void yield();
+
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThread.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThreadGroup.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThreadGroup.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThreadGroup.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThreadGroup.java Mon May  1 16:11:39 2006
@@ -0,0 +1,20 @@
+/* Copyright 1998, 2006 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;
+
+public class VMThreadGroup 
+{
+    //fixit  -- for simple "hello world" app, an empty VMThreadGroup seems to work OK
+}

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThreadGroup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThrowable.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThrowable.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThrowable.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThrowable.java Mon May  1 16:11:39 2006
@@ -0,0 +1,23 @@
+/* Copyright 1998, 2006 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;
+
+public class VMThrowable 
+{
+    private Object vmdata;  //  jchevm/libjc/bootstrap.c needs to resolve this field for "hello world to work"
+    static public final native Throwable fillInStackTrace(Throwable thr); // corresponds to jchevm/libjc/native/java_lang_VMThrowable.c
+    final public native StackTraceElement[] getStackTrace(Throwable thr); // corresponds to jchevm/libjc/native/java_lang_VMThrowable.c
+}
+

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/VMThrowable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java Mon May  1 16:11:39 2006
@@ -0,0 +1,124 @@
+/* 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.ref;
+
+/**
+ * This class must be implemented by the vm vendor. The documented methods must
+ * be implemented to support the provided subclass implementations. As the
+ * provided subclass implementations are trivial and simply call
+ * initReference(Object) and initReference(Object, ReferenceQueue) from their
+ * constructors, the vm vendor may elect to implement the subclasses as well.
+ * Abstract class which describes behavior common to all reference objects.
+ * 
+ * @since JDK1.2
+ */
+public abstract class Reference extends Object {
+
+    Object referent;
+    ReferenceQueue queue;
+
+	/**
+	 * Make the referent null. This does not force the reference object to be
+	 * enqueued.
+	 * 
+	 */
+	public void clear() {
+		return;
+	}
+
+	/**
+	 * Force the reference object to be enqueued if it has been associated with
+	 * a queue.
+	 * 
+	 * @return boolean true if Reference is enqueued. false otherwise.
+	 */
+	public boolean enqueue() {
+		return false;
+	}
+
+	/**
+	 * Return the referent of the reference object.
+	 * 
+	 * @return Object Referent to which reference refers, or null if object has
+	 *         been cleared.
+	 */
+	public Object get() {
+		return null;
+	}
+
+	/**
+	 * Return whether the reference object has been enqueued.
+	 * 
+	 * @return boolean true if Reference has been enqueued. false otherwise.
+	 */
+	public boolean isEnqueued() {
+		return false;
+	}
+
+	/**
+	 * Enqueue the reference object on the associated queue.
+	 * 
+	 * @return boolean true if the Reference was successfully enqueued. false
+	 *         otherwise.
+	 */
+	boolean enqueueImpl() {
+		return false;
+	}
+
+	/**
+	 * Constructs a new instance of this class.
+	 * 
+	 */
+	Reference() {
+		super();
+	}
+
+	/**
+	 * Implement this method to support the provided subclass implementations.
+	 * Initialize a newly created reference object. Associate the reference
+	 * object with the referent.
+	 * 
+	 * @param r
+	 *            the referent
+	 */
+	void initReference(Object r) {
+		return;
+	}
+
+	/**
+	 * Implement this method to support the provided subclass implementations.
+	 * Initialize a newly created reference object. Associate the reference
+	 * object with the referent, and the specified ReferenceQueue.
+	 * 
+	 * @param r
+	 *            the referent
+	 * @param q
+	 *            the ReferenceQueue
+	 */
+	void initReference(Object r, ReferenceQueue q) {
+		return;
+	}
+
+	/**
+	 * Called when a Reference has been removed from its ReferenceQueue.
+	 * Set the enqueued field to false.
+	 */
+	void dequeue() {
+		return;
+	}
+
+}
+

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ref/Reference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Constructor.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Constructor.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Constructor.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Constructor.java Mon May  1 16:11:39 2006
@@ -0,0 +1,176 @@
+/* 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.reflect;
+
+/**
+ * This class must be implemented by the vm vendor. This class models a
+ * constructor. Information about the constructor can be accessed, and the
+ * constructor can be invoked dynamically.
+ * 
+ */
+public final class Constructor extends AccessibleObject implements Member {
+
+	/**
+	 * Compares the specified object to this Constructor and answer if they are
+	 * equal. The object must be an instance of Constructor with the same
+	 * defining class and parameter types.
+	 * 
+	 * @param object
+	 *            the object to compare
+	 * @return true if the specified object is equal to this Constructor, false
+	 *         otherwise
+	 * @see #hashCode
+	 */
+
+    Constructor(Class c1, int i1) 
+    {
+    }
+
+    Class clazz;            //required by JCHEVM's bootstrap.c
+    int slot;               //required by JCHEVM's bootstrap.c
+
+	public boolean equals(Object object) {
+		return false;
+	}
+
+	/**
+	 * Return the java.lang.Class associated with the class that defined this
+	 * constructor.
+	 * 
+	 * @return the declaring class
+	 */
+	public Class getDeclaringClass() {
+		return null;
+	}
+
+	/**
+	 * Return an array of the java.lang.Class objects associated with the
+	 * exceptions declared to be thrown by this constructor. If the constructor
+	 * was not declared to throw any exceptions, the array returned will be
+	 * empty.
+	 * 
+	 * @return the declared exception classes
+	 */
+	public Class[] getExceptionTypes() {
+		return null;
+	}
+
+	/**
+	 * Return the modifiers for the modelled constructor. The Modifier class
+	 * should be used to decode the result.
+	 * 
+	 * @return the modifiers
+	 * @see java.lang.reflect.Modifier
+	 */
+	public int getModifiers() {
+		return 0;
+	}
+
+	/**
+	 * Return the name of the modelled constructor. This is the name of the
+	 * declaring class.
+	 * 
+	 * @return the name
+	 */
+	public String getName() {
+		return null;
+	}
+
+	/**
+	 * Return an array of the java.lang.Class objects associated with the
+	 * parameter types of this constructor. If the constructor was declared with
+	 * no parameters, the array returned will be empty.
+	 * 
+	 * @return the parameter types
+	 */
+	public Class[] getParameterTypes() {
+		return null;
+	}
+
+	/**
+	 * Answers an integer hash code for the receiver. Objects which are equal
+	 * answer the same value for this method. The hash code for a Constructor is
+	 * the hash code of the declaring class' name.
+	 * 
+	 * @return the receiver's hash
+	 * @see #equals
+	 */
+	public int hashCode() {
+		return 0;
+	}
+
+	/**
+	 * Return a new instance of the declaring class, initialized by dynamically
+	 * invoking the modelled constructor. This reproduces the effect of
+	 * <code>new declaringClass(arg1, arg2, ... , argN)</code> This method
+	 * performs the following:
+	 * <ul>
+	 * <li>A new instance of the declaring class is created. If the declaring
+	 * class cannot be instantiated (i.e. abstract class, an interface, an array
+	 * type, or a base type) then an InstantiationException is thrown.</li>
+	 * <li>If this Constructor object is enforcing access control (see
+	 * AccessibleObject) and the modelled constructor is not accessible from the
+	 * current context, an IllegalAccessException is thrown.</li>
+	 * <li>If the number of arguments passed and the number of parameters do
+	 * not match, an IllegalArgumentException is thrown.</li>
+	 * <li>For each argument passed:
+	 * <ul>
+	 * <li>If the corresponding parameter type is a base type, the argument is
+	 * unwrapped. If the unwrapping fails, an IllegalArgumentException is
+	 * thrown.</li>
+	 * <li>If the resulting argument cannot be converted to the parameter type
+	 * via a widening conversion, an IllegalArgumentException is thrown.</li>
+	 * </ul>
+	 * <li>The modelled constructor is then invoked. If an exception is thrown
+	 * during the invocation, it is caught and wrapped in an
+	 * InvocationTargetException. This exception is then thrown. If the
+	 * invocation completes normally, the newly initialized object is returned.
+	 * </ul>
+	 * 
+	 * @param args
+	 *            the arguments to the constructor
+	 * @return the new, initialized, object
+	 * @exception java.lang.InstantiationException
+	 *                if the class cannot be instantiated
+	 * @exception java.lang.IllegalAccessException
+	 *                if the modelled constructor is not accessible
+	 * @exception java.lang.IllegalArgumentException
+	 *                if an incorrect number of arguments are passed, or an
+	 *                argument could not be converted by a widening conversion
+	 * @exception java.lang.reflect.InvocationTargetException
+	 *                if an exception was thrown by the invoked constructor
+	 * @see java.lang.reflect.AccessibleObject
+	 */
+	public Object newInstance(Object args[]) throws InstantiationException,
+			IllegalAccessException, IllegalArgumentException,
+			InvocationTargetException {
+		return null;
+	}
+
+	/**
+	 * Answers a string containing a concise, human-readable description of the
+	 * receiver. The format of the string is modifiers (if any) declaring class
+	 * name '(' parameter types, separated by ',' ')' If the constructor throws
+	 * exceptions, ' throws ' exception types, separated by ',' For example:
+	 * <code>public String(byte[],String) throws UnsupportedEncodingException</code>
+	 * 
+	 * @return a printable representation for the receiver
+	 */
+	public String toString() {
+		return null;
+	}
+}
+

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Constructor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Field.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Field.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Field.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Field.java Mon May  1 16:11:39 2006
@@ -0,0 +1,630 @@
+/* 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.reflect;
+
+/**
+ * This class must be implemented by the vm vendor. This class models a field.
+ * Information about the field can be accessed, and the field's value can be
+ * accessed dynamically.
+ * 
+ */
+public final class Field extends AccessibleObject implements Member {
+
+	/**
+	 * Compares the specified object to this Field and answer if they are equal.
+	 * The object must be an instance of Field with the same defining class and
+	 * name.
+	 * 
+	 * @param object
+	 *            the object to compare
+	 * @return true if the specified object is equal to this Field, false
+	 *         otherwise
+	 * @see #hashCode
+	 */
+    Field (Class c1, String s1, int i1) 
+    {
+    }
+	public boolean equals(Object object) {
+		return false;
+	}
+    Class declaringClass;           //required by JCHEVM's bootstrap.c
+    int slot;                       //required by JCHEVN's bootstrap.c
+
+	/**
+	 * Return the value of the field in the specified object. This reproduces
+	 * the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * The value of the field is returned. If the type of this field is a base
+	 * type, the field value is automatically wrapped.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value, possibly wrapped
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native Object get(Object object) throws IllegalAccessException,
+			IllegalArgumentException;
+
+	/**
+	 * Return the value of the field in the specified object as a boolean. This
+	 * reproduces the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native boolean getBoolean(Object object)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Return the value of the field in the specified object as a byte. This
+	 * reproduces the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native byte getByte(Object object) throws IllegalAccessException,
+			IllegalArgumentException;
+
+	/**
+	 * Return the value of the field in the specified object as a char. This
+	 * reproduces the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native char getChar(Object object) throws IllegalAccessException,
+			IllegalArgumentException;
+
+	/**
+	 * Return the java.lang.Class associated with the class that defined this
+	 * field.
+	 * 
+	 * @return the declaring class
+	 */
+	public Class getDeclaringClass() {
+		return null;
+	}
+
+	/**
+	 * Return the value of the field in the specified object as a double. This
+	 * reproduces the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native double getDouble(Object object)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Return the value of the field in the specified object as a float. This
+	 * reproduces the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native float getFloat(Object object) throws IllegalAccessException,
+			IllegalArgumentException;
+
+	/**
+	 * Return the value of the field in the specified object as an int. This
+	 * reproduces the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native int getInt(Object object) throws IllegalAccessException,
+			IllegalArgumentException;
+
+	/**
+	 * Return the value of the field in the specified object as a long. This
+	 * reproduces the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native long getLong(Object object) throws IllegalAccessException,
+			IllegalArgumentException;
+
+	/**
+	 * Return the modifiers for the modelled field. The Modifier class should be
+	 * used to decode the result.
+	 * 
+	 * @return the modifiers
+	 * @see java.lang.reflect.Modifier
+	 */
+	public native int getModifiers();
+
+	/**
+	 * Return the name of the modelled field.
+	 * 
+	 * @return the name
+	 */
+	public String getName() {
+		return null;
+	}
+
+	/**
+	 * Return the value of the field in the specified object as a short. This
+	 * reproduces the effect of <code>object.fieldName</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @return the field value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native short getShort(Object object) throws IllegalAccessException,
+			IllegalArgumentException;
+
+	native String getSignature();
+
+	/**
+	 * Return the java.lang.Class associated with the type of this field.
+	 * 
+	 * @return the type
+	 */
+	public Class getType() {
+		return null;
+	}
+
+	/**
+	 * Answers an integer hash code for the receiver. Objects which are equal
+	 * answer the same value for this method.
+	 * <p>
+	 * The hash code for a Field is the hash code of the field's name.
+	 * 
+	 * @return the receiver's hash
+	 * @see #equals
+	 */
+	public int hashCode() {
+		return 0;
+	}
+
+	/**
+	 * Set the value of the field in the specified object to the boolean value.
+	 * This reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the field type is a base type, the value is automatically unwrapped.
+	 * If the unwrap fails, an IllegalArgumentException is thrown. If the value
+	 * cannot be converted to the field type via a widening conversion, an
+	 * IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void set(Object object, Object value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Set the value of the field in the specified object to the boolean value.
+	 * This reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the value cannot be converted to the field type via a widening
+	 * conversion, an IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void setBoolean(Object object, boolean value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Set the value of the field in the specified object to the byte value.
+	 * This reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the value cannot be converted to the field type via a widening
+	 * conversion, an IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void setByte(Object object, byte value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Set the value of the field in the specified object to the char value.
+	 * This reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the value cannot be converted to the field type via a widening
+	 * conversion, an IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void setChar(Object object, char value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Set the value of the field in the specified object to the double value.
+	 * This reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the value cannot be converted to the field type via a widening
+	 * conversion, an IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void setDouble(Object object, double value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Set the value of the field in the specified object to the float value.
+	 * This reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the value cannot be converted to the field type via a widening
+	 * conversion, an IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void setFloat(Object object, float value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Set the value of the field in the specified object to the int value. This
+	 * reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the value cannot be converted to the field type via a widening
+	 * conversion, an IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void setInt(Object object, int value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Set the value of the field in the specified object to the long value.
+	 * This reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the value cannot be converted to the field type via a widening
+	 * conversion, an IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void setLong(Object object, long value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Set the value of the field in the specified object to the short value.
+	 * This reproduces the effect of <code>object.fieldName = value</code>
+	 * <p>
+	 * If the modelled field is static, the object argument is ignored.
+	 * Otherwise, if the object is null, a NullPointerException is thrown. If
+	 * the object is not an instance of the declaring class of the method, an
+	 * IllegalArgumentException is thrown.
+	 * <p>
+	 * If this Field object is enforcing access control (see AccessibleObject)
+	 * and the modelled field is not accessible from the current context, an
+	 * IllegalAccessException is thrown.
+	 * <p>
+	 * If the value cannot be converted to the field type via a widening
+	 * conversion, an IllegalArgumentException is thrown.
+	 * 
+	 * @param object
+	 *            the object to access
+	 * @param value
+	 *            the new value
+	 * @throws NullPointerException
+	 *             if the object is null and the field is non-static
+	 * @throws IllegalArgumentException
+	 *             if the object is not compatible with the declaring class
+	 * @throws IllegalAccessException
+	 *             if modelled field is not accessible
+	 */
+	public native void setShort(Object object, short value)
+			throws IllegalAccessException, IllegalArgumentException;
+
+	/**
+	 * Answers a string containing a concise, human-readable description of the
+	 * receiver.
+	 * <p>
+	 * The format of the string is:
+	 * <ul>
+	 * <li>modifiers (if any)
+	 * <li>return type
+	 * <li>declaring class name
+	 * <li>'.'
+	 * <li>field name
+	 * </ul>
+	 * <p>
+	 * For example:
+	 * <code>public static java.io.InputStream java.lang.System.in</code>
+	 * 
+	 * @return a printable representation for the receiver
+	 */
+	public String toString() {
+		return null;
+	}
+}
+

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Field.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Method.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Method.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Method.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Method.java Mon May  1 16:11:39 2006
@@ -0,0 +1,193 @@
+/* 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.reflect;
+
+/**
+ * This class must be implemented by the vm vendor. This class models a method.
+ * Information about the method can be accessed, and the method can be invoked
+ * dynamically.
+ * 
+ */
+public final class Method extends AccessibleObject implements Member {
+	/**
+	 * Compares the specified object to this Method and answer if they are
+	 * equal. The object must be an instance of Method with the same defining
+	 * class and parameter types.
+	 * 
+	 * @param object
+	 *            the object to compare
+	 * @return true if the specified object is equal to this Method, false
+	 *         otherwise
+	 * @see #hashCode
+	 */
+    Method (Class c1, String s1, int i1) 
+    {
+    }
+    Class declaringClass;  //required by JCHEVM's bootstrap.c
+    int slot;               // required by JCHEVM's bootstrap.c
+
+	public boolean equals(Object object) {
+		return false;
+	}
+
+	/**
+	 * Return the java.lang.Class associated with the class that defined this
+	 * constructor.
+	 * 
+	 * @return the declaring class
+	 */
+	public Class getDeclaringClass() {
+		return null;
+	}
+
+	/**
+	 * Return an array of the java.lang.Class objects associated with the
+	 * exceptions declared to be thrown by this method. If the method was not
+	 * declared to throw any exceptions, the array returned will be empty.
+	 * 
+	 * @return the declared exception classes
+	 */
+	public Class[] getExceptionTypes() {
+		return null;
+	}
+
+	/**
+	 * Return the modifiers for the modelled constructor. The Modifier class
+	 * should be used to decode the result.
+	 * 
+	 * @return the modifiers
+	 * @see java.lang.reflect.Modifier
+	 */
+	public int getModifiers() {
+		return 0;
+	}
+
+	/**
+	 * Return the name of the modelled method.
+	 * 
+	 * @return the name
+	 */
+	public String getName() {
+		return null;
+	}
+
+	/**
+	 * Return an array of the java.lang.Class objects associated with the
+	 * parameter types of this method. If the method was declared with no
+	 * parameters, the array returned will be empty.
+	 * 
+	 * @return the parameter types
+	 */
+	public Class[] getParameterTypes() {
+		return null;
+	}
+
+	/**
+	 * Return the java.lang.Class associated with the return type of this
+	 * method.
+	 * 
+	 * @return the return type
+	 */
+	public Class getReturnType() {
+		return null;
+	}
+
+	/**
+	 * Answers an integer hash code for the receiver. Objects which are equal
+	 * answer the same value for this method. The hash code for a Method is the
+	 * hash code of the method's name.
+	 * 
+	 * @return the receiver's hash
+	 * @see #equals
+	 */
+	public int hashCode() {
+		return 0;
+	}
+
+	/**
+	 * Return the result of dynamically invoking the modelled method. This
+	 * reproduces the effect of
+	 * <code>receiver.methodName(arg1, arg2, ... , argN)</code> This method
+	 * performs the following:
+	 * <ul>
+	 * <li>If the modelled method is static, the receiver argument is ignored.
+	 * </li>
+	 * <li>Otherwise, if the receiver is null, a NullPointerException is
+	 * thrown.</li>
+	 * If the receiver is not an instance of the declaring class of the method,
+	 * an IllegalArgumentException is thrown.
+	 * <li>If this Method object is enforcing access control (see
+	 * AccessibleObject) and the modelled method is not accessible from the
+	 * current context, an IllegalAccessException is thrown.</li>
+	 * <li>If the number of arguments passed and the number of parameters do
+	 * not match, an IllegalArgumentException is thrown.</li>
+	 * <li>For each argument passed:
+	 * <ul>
+	 * <li>If the corresponding parameter type is a base type, the argument is
+	 * unwrapped. If the unwrapping fails, an IllegalArgumentException is
+	 * thrown.</li>
+	 * <li>If the resulting argument cannot be converted to the parameter type
+	 * via a widening conversion, an IllegalArgumentException is thrown.</li>
+	 * </ul>
+	 * <li>If the modelled method is static, it is invoked directly. If it is
+	 * non-static, the modelled method and the receiver are then used to perform
+	 * a standard dynamic method lookup. The resulting method is then invoked.
+	 * </li>
+	 * <li>If an exception is thrown during the invocation it is caught and
+	 * wrapped in an InvocationTargetException. This exception is then thrown.
+	 * </li>
+	 * <li>If the invocation completes normally, the return value is itself
+	 * returned. If the method is declared to return a base type, the return
+	 * value is first wrapped. If the return type is void, null is returned.
+	 * </li>
+	 * </ul>
+	 * 
+	 * @param args
+	 *            the arguments to the constructor
+	 * @return the new, initialized, object
+	 * @exception java.lang.NullPointerException
+	 *                if the receiver is null for a non-static method
+	 * @exception java.lang.IllegalAccessException
+	 *                if the modelled method is not accessible
+	 * @exception java.lang.IllegalArgumentException
+	 *                if an incorrect number of arguments are passed, the
+	 *                receiver is incompatible with the declaring class, or an
+	 *                argument could not be converted by a widening conversion
+	 * @exception java.lang.reflect.InvocationTargetException
+	 *                if an exception was thrown by the invoked constructor
+	 * @see java.lang.reflect.AccessibleObject
+	 */
+	public Object invoke(Object receiver, Object args[])
+			throws IllegalAccessException, IllegalArgumentException,
+			InvocationTargetException {
+		return null;
+	}
+
+	/**
+	 * Answers a string containing a concise, human-readable description of the
+	 * receiver. The format of the string is modifiers (if any) return type
+	 * declaring class name '.' method name '(' parameter types, separated by
+	 * ',' ')' If the method throws exceptions, ' throws ' exception types,
+	 * separated by ',' For example:
+	 * <code>public native Object java.lang.Method.invoke(Object,Object) throws IllegalAccessException,IllegalArgumentException,InvocationTargetException</code>
+	 * 
+	 * @return a printable representation for the receiver
+	 */
+	public String toString() {
+		return null;
+	}
+}
+

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/reflect/Method.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/nio/DirectByteBufferImpl.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/nio/DirectByteBufferImpl.java?rev=398726&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/nio/DirectByteBufferImpl.java (added)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/nio/DirectByteBufferImpl.java Mon May  1 16:11:39 2006
@@ -0,0 +1,42 @@
+package java.nio;
+
+class DirectByteBufferImpl
+{
+    public static void junk()
+    {
+        //below is testing code that should ultimately be removed
+        DirectByteBufferImpl db = new DirectByteBufferImpl();
+        db.doit();
+    }
+
+    public void doit()
+    {
+        ReadWrite kk = new ReadWrite();
+    }
+
+    static final class ReadWrite extends DirectByteBufferImpl
+    {
+        public ReadWrite ()
+        {
+        }
+
+        //(Ljava/lang/Object;Lgnu/classpath/Pointer;III)V
+        public ReadWrite(Object obj1, gnu.classpath.Pointer ptr1, int i1, int i2, int i3)
+        {
+
+        }
+        public ReadWrite(int i1)
+        {
+
+        }
+        public ReadWrite(Object obj1)
+        {
+
+        }
+        public ReadWrite(gnu.classpath.Pointer ptr1)
+        {
+
+        }
+    }
+}
+

Propchange: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/nio/DirectByteBufferImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message