harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r441341 [1/3] - /incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/
Date Fri, 08 Sep 2006 02:19:17 GMT
Author: ndbeyer
Date: Thu Sep  7 19:19:16 2006
New Revision: 441341

URL: http://svn.apache.org/viewvc?view=rev&rev=441341
Log:
Code cleanup; add braces, remove compiler warnings, add documentation, etc

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Package.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Runtime.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/StackTraceElement.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/System.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ThreadGroup.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Throwable.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java?view=diff&rev=441341&r1=441340&r2=441341
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Class.java Thu Sep  7 19:19:16 2006
@@ -70,80 +70,109 @@
  * 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>
+ * 
  * @since 1.0
  */
 public final class Class<T> implements Serializable, AnnotatedElement, GenericDeclaration, Type {
 
-	private static final long serialVersionUID = 3206093459760846163L;
+    private static final long serialVersionUID = 3206093459760846163L;
 
-	/**
-	 * Answers a Class object which represents the class named by the argument.
-	 * The name should be the name of a class as described in the class
-	 * definition of {@link 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 {@link 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 {@link 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 class loader to use to load the class
-	 * @return the named class.
-	 * @throws ClassNotFoundException
-	 *             If the class could not be found
-	 * @see {@link 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 super classes and interfaces
-	 * 
-	 * @return the class' public class members
-	 * @throws SecurityException
-	 *             If member access is not allowed
-	 * @see {@link 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;
-	}
+    /**
+     * 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 privileged classes
+     * @return the array of the most recent classes on the stack
+     */
+    static final Class[] getStackClasses(int maxDepth, boolean stopAtPrivileged) {
+        return null;
+    }
 
     /**
-     * Answers the annotation of the given type.
-     * If there is no annotation the method returns <code>null</code>.
+     * 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 {@link 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 {@link 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 {@link 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 class loader to use to load the class
+     * @return the named class.
+     * @throws ClassNotFoundException If the class could not be found
+     * @see {@link 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 super classes and interfaces
+     * 
+     * @return the class' public class members
+     * @throws SecurityException If member access is not allowed
+     * @see {@link 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 annotation of the given type. If there is no annotation the
+     * method returns <code>null</code>.
      * 
      * @param annotationClass the annotation type.
-     * @return the annotation of the given type, or <code>null</code>
-     * if none.
+     * @return the annotation of the given type, or <code>null</code> if none.
      * @since 1.5
      */
     public <A extends Annotation> A getAnnotation(Class<A> annotationClass) {
@@ -151,19 +180,19 @@
     }
 
     /**
-     * Answers all the annotations of the receiver.
-     * If there are no annotations then answers an empty array.
+     * Answers all the annotations of the receiver. If there are no annotations
+     * then answers an empty array.
      * 
-     * @return a copy of the array containing the receiver's annotations. 
+     * @return a copy of the array containing the receiver's annotations.
      */
     public Annotation[] getAnnotations() {
         return new Annotation[0];
     }
 
     /**
-     * Answers the canonical name of the receiver.
-     * If the receiver does not have a canonical name, as defined in
-     * the Java Language Specification, then the method returns <code>null</code>.
+     * Answers the canonical name of the receiver. If the receiver does not have
+     * a canonical name, as defined in the Java Language Specification, then the
+     * method returns <code>null</code>.
      * 
      * @return the receiver canonical name, or <code>null</code>.
      */
@@ -171,217 +200,199 @@
         return null;
     }
 
-	/**
-	 * Answers the class loader 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 {@link 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 {@link 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<T> 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 the class loader 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 {@link 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 {@link 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<T> 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 the annotations that are directly defined on this type.
-     * Annotations that are inherited are not included in the result.
-     * If there are no annotations, returns an empty array.
+     * Annotations that are inherited are not included in the result. If there
+     * are no annotations, returns an empty array.
      * 
-     * @return a copy of the array containing the receiver's defined annotations.
+     * @return a copy of the array containing the receiver's defined
+     *         annotations.
      * @since 1.5
      */
     public Annotation[] getDeclaredAnnotations() {
         return new Annotation[0];
     }
 
-	/**
-	 * 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 {@link Class}
-	 */
-	public Class[] getDeclaredClasses() throws SecurityException {
-		return new Class[0];
-	}
-
-	/**
-	 * 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
-	 */
+    /**
+     * 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 {@link Class}
+     */
+    public Class[] getDeclaredClasses() throws SecurityException {
+        return new Class[0];
+    }
+
+    /**
+     * 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<T> 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 new Constructor[0];
-	}
-
-	/**
-	 * 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 new Field[0];
-	}
-
-	/**
-	 * 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
+    /**
+     * 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 new Constructor[0];
+    }
+
+    /**
+     * 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 new Field[0];
+    }
+
+    /**
+     * 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
      * @throws NullPointerException if the name parameter is <code>null</code>.
-	 * @see #getMethods
-	 */
+     * @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
+     * @throws SecurityException if member access is not allowed
      * @return the receiver's methods.
      * @see #getMethods
      */
-	public Method[] getDeclaredMethods() throws SecurityException {
-		return new Method[0];
-	}
-
-	/**
-	 * 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;
-	}
-    
+    public Method[] getDeclaredMethods() throws SecurityException {
+        return new Method[0];
+    }
+
+    /**
+     * 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 the class that directly encloses the receiver.  If there is no
+     * Answers the class that directly encloses the receiver. If there is no
      * enclosing class the method returns <code>null</code>.
      * 
      * @return the enclosing class or <code>null</code>.
@@ -391,8 +402,9 @@
     }
 
     /**
-     * Gets the {@link Constructor}, which encloses the declaration of this class, if
-     * it is an anonymous or local/automatic class, otherwise <code>null</code>.
+     * Gets the {@link Constructor}, which encloses the declaration of this
+     * class, if it is an anonymous or local/automatic class, otherwise
+     * <code>null</code>.
      * 
      * @return A {@link Constructor} instance or <code>null</code>.
      * @since 1.5
@@ -402,8 +414,9 @@
     }
 
     /**
-     * Gets the {@link Method}, which encloses the declaration of this class, if
-     * it is an anonymous or local/automatic class, otherwise <code>null</code>.
+     * Gets the {@link Method}, which encloses the declaration of this class,
+     * if it is an anonymous or local/automatic class, otherwise
+     * <code>null</code>.
      * 
      * @return A {@link Method} instance or <code>null</code>.
      * @since 1.5
@@ -411,51 +424,48 @@
     public Method getEnclosingMethod() {
         return null;
     }
-    
+
     /**
-     * Gets the <code>enum</code> constants/fields associated with this
-     * class if it is an {@linkplain #isEnum() enum}, otherwise <code>null</code>.
-     * @return An array of the <code>enum</code> constants for this class or <code>null</code>.
+     * Gets the <code>enum</code> constants/fields associated with this class
+     * if it is an {@linkplain #isEnum() enum}, otherwise <code>null</code>.
+     * 
+     * @return An array of the <code>enum</code> constants for this class or
+     *         <code>null</code>.
      * @since 1.5
      */
     public T[] getEnumConstants() {
         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 new Field[0];
-	}
+    /**
+     * 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 new Field[0];
+    }
 
     /**
-     * Gets the {@link Type types} of the interface that this class
-     * directly implements.
+     * Gets the {@link Type types} of the interface that this class directly
+     * implements.
      * 
      * @return An array of {@link Type} instances.
      * @since 1.5
@@ -466,84 +476,79 @@
 
     /**
      * Gets the {@link Type} that represents the super class of this class.
+     * 
      * @return An instance of {@link Type}
      * @since 1.5
      */
     public Type getGenericSuperclass() {
         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 new Class[0];
-	}
-
-	/**
-	 * 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 {
+
+    /**
+     * 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 new Class[0];
+    }
+
+    /**
+     * 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
+     * @throws SecurityException if member access is not allowed
      * @see #getDeclaredMethods
      */
-	public Method[] getMethods() throws SecurityException {
-		return new Method[0];
-	}
-
-	/**
-	 * 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 {@link 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
-	 * {@link Class}.
-	 * 
-	 * @return the receiver's name.
-	 * @see {@link Class}
-	 */
-	public String getName() {
-		return null;
-	}
-
-    /**
-     * Answers the simple name of the receiver as defined in the source code.
-     * If there is no name (the class is anonymous) returns an empty string, and
-     * if the receiver is an array returns the name of the underlying type with
+    public Method[] getMethods() throws SecurityException {
+        return new Method[0];
+    }
+
+    /**
+     * 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 {@link 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
+     * {@link Class}.
+     * 
+     * @return the receiver's name.
+     * @see {@link Class}
+     */
+    public String getName() {
+        return null;
+    }
+
+    /**
+     * Answers the simple name of the receiver as defined in the source code. If
+     * there is no name (the class is anonymous) returns an empty string, and if
+     * the receiver is an array returns the name of the underlying type with
      * square braces appended (e.g. <code>&quot;Integer[]&quot;</code>).
      * 
      * @return the simple name of the receiver.
@@ -552,89 +557,89 @@
         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 {@link 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 {@link 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 {@link 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 {@link 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 new Object[0];
-	}
-
-	/**
-	 * Answers the Class which represents the receiver's superclass. For Classes
-	 * which represent base types, interfaces, and for {@link Object} the
-	 * method answers null.
-	 * 
-	 * @return the receiver's superclass.
-	 */
+    /**
+     * 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 {@link 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 {@link 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 {@link 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 {@link 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 new Object[0];
+    }
+
+    /**
+     * Answers the Class which represents the receiver's superclass. For Classes
+     * which represent base types, interfaces, and for {@link Object} the method
+     * answers null.
+     * 
+     * @return the receiver's superclass.
+     */
     public Class<? super T> getSuperclass() {
-		return null;
-	}
+        return null;
+    }
 
     /**
      * Gets the type variables associated with this class.
+     * 
      * @return An array of {@link TypeVariable} instances.
      * @since 1.5
      */
+    @SuppressWarnings("unchecked")
     public TypeVariable<Class<T>>[] getTypeParameters() {
         return new TypeVariable[0];
     }
@@ -642,8 +647,8 @@
     /**
      * Indicates whether or not this class is an annotation.
      * 
-     * @return A value of <code>true</code> if this class is an annotation, otherwise
-     * <code>false</code>.
+     * @return A value of <code>true</code> if this class is an annotation,
+     *         otherwise <code>false</code>.
      * @since 1.5
      */
     public boolean isAnnotation() {
@@ -651,12 +656,11 @@
     }
 
     /**
-     * Indicates whether or not the given annotation is present for this
-     * class.
+     * Indicates whether or not the given annotation is present for this class.
      * 
      * @param annotationClass The annotation to look for in this class.
-     * @return A value of <code>true</code> if the annotation is present, otherwise
-     * <code>false</code>.
+     * @return A value of <code>true</code> if the annotation is present,
+     *         otherwise <code>false</code>.
      * @since 1.5
      */
     public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
@@ -665,166 +669,165 @@
 
     /**
      * Indicates whether or not this class was anonymously declared.
-     * @return A value of <code>true</code> if this class is anonymous, otherwise
-     * <code>false</code>.
+     * 
+     * @return A value of <code>true</code> if this class is anonymous,
+     *         otherwise <code>false</code>.
      * @since 1.5
      */
     public boolean isAnonymousClass() {
         return false;
     }
-    
-	/**
-	 * 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 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;
+    }
 
     /**
      * Indicates whether or not this class is an <code>enum</code>.
-     * @return A value of <code>true</code> if this class is an {@link Enum}, otherwise <code>false</code>.
+     * 
+     * @return A value of <code>true</code> if this class is an {@link Enum},
+     *         otherwise <code>false</code>.
      * @since 1.5
      */
     public boolean isEnum() {
         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 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 whether the receiver is defined locally.
      * 
-     * @return <code>true</code> if the class is local,
-     * otherwise <code>false</code>.
+     * @return <code>true</code> if the class is local, otherwise
+     *         <code>false</code>.
      */
     public boolean isLocalClass() {
         return false;
     }
-    
+
     /**
      * Answers whether the receiver is a member class.
      * 
-     * @return <code>true</code> if the class is a member class,
-     * otherwise <code>false</code>.
+     * @return <code>true</code> if the class is a member class, otherwise
+     *         <code>false</code>.
      */
     public boolean isMemberClass() {
         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 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 whether the receiver is a synthetic type.
      * 
-     * @return <code>true</code> if the receiver is a synthetic type
-     *         and <code>false</code> otherwise.
+     * @return <code>true</code> if the receiver is a synthetic type and
+     *         <code>false</code> otherwise.
      */
     public boolean isSynthetic() {
         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 T 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 if 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 class loader default, package or class default
-	 * at runtime
-	 * 
-	 * @return the assertion status for this class
-	 */
-	public boolean desiredAssertionStatus() {
-		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 T 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.
+     */
+    @Override
+    public String toString() {
+        return null;
+    }
+
+    /**
+     * Returns the Package of which this class is a member. A class has a
+     * Package if 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 class loader default, package or class default
+     * at runtime
+     * 
+     * @return the assertion status for this class
+     */
+    public boolean desiredAssertionStatus() {
+        return false;
+    }
 
     /**
      * Casts the receiver to a subclass of the given class.  If successful
@@ -851,42 +854,4 @@
     public T cast(Object obj) {
         return null;
     }
-
-	/**
-	 * 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 privileged classes
-	 * @return the array of the most recent classes on the stack
-	 */
-	static final Class[] getStackClasses(int maxDepth, boolean stopAtPrivileged) {
-		return null;
-	}
-
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java?view=diff&rev=441341&r1=441340&r2=441341
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java Thu Sep  7 19:19:16 2006
@@ -47,7 +47,7 @@
 
     /**
      * <p>
-     * TODO Document this methods purpose.
+     * TODO Document this method.
      * </p>
      */
     static final void initializeClassLoaders() {
@@ -55,6 +55,63 @@
     }
 
     /**
+     * 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 The system classLoader.
+     * @throws 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 specifying a resource which can be found by looking up
+     * resName using the system class loader's resource lookup algorithm.
+     * 
+     * @return A URL specifying a system resource or null.
+     * @param resName The name of the resource to find.
+     * @see Class#getResource
+     */
+    public static URL getSystemResource(String resName) {
+        return null;
+    }
+
+    /**
+     * Answers an Enumeration of URLs containing all resources which can be
+     * found by looking up resName using the system class loader's resource
+     * lookup algorithm.
+     * 
+     * @return An Enumeration of URLs containing the system resources
+     * @param resName String the name of the resource to find.
+     */
+    public static Enumeration<URL> 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;
+    }
+
+    /**
      * Constructs a new instance of this class with the system class loader as
      * its parent.
      * 
@@ -88,6 +145,7 @@
      * @param length The length of the class file.
      * @deprecated Use defineClass(String, byte[], int, int)
      */
+    @Deprecated
     protected final Class<?> defineClass(byte[] classRep, int offset, int length)
             throws ClassFormatError {
         return null;
@@ -102,8 +160,8 @@
      * @param offset The offset into the classRep
      * @param length The length of the class file
      */
-    protected final Class<?> defineClass(String className, byte[] classRep,
-            int offset, int length) throws ClassFormatError {
+    protected final Class<?> defineClass(String className, byte[] classRep, int offset,
+            int length) throws ClassFormatError {
         return null;
     }
 
@@ -119,9 +177,8 @@
      * @param 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 {
+    protected final Class<?> defineClass(String className, byte[] classRep, int offset,
+            int length, ProtectionDomain protectionDomain) throws java.lang.ClassFormatError {
         return null;
     }
 
@@ -154,8 +211,7 @@
      * @param className The name of the class to search for.
      * @throws ClassNotFoundException if the class cannot be found.
      */
-    protected Class<?> findClass(String className)
-            throws ClassNotFoundException {
+    protected Class<?> findClass(String className) throws ClassNotFoundException {
         return null;
     }
 
@@ -169,7 +225,7 @@
      */
     protected final Class<?> findLoadedClass(String className) {
         return null;
-    };
+    }
 
     /**
      * Attempts to load a class using the system class loader. Note that the
@@ -179,8 +235,7 @@
      * @param className The name of the class to search for.
      * @throws ClassNotFoundException if the class cannot be found.
      */
-    protected final Class<?> findSystemClass(String className)
-            throws ClassNotFoundException {
+    protected final Class<?> findSystemClass(String className) throws ClassNotFoundException {
         return null;
     }
 
@@ -234,64 +289,6 @@
     }
 
     /**
-     * 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 The system classLoader.
-     * @throws 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 specifying a resource which can be found by looking up
-     * resName using the system class loader's resource lookup algorithm.
-     * 
-     * @return A URL specifying a system resource or null.
-     * @param resName The name of the resource to find.
-     * @see Class#getResource
-     */
-    public static URL getSystemResource(String resName) {
-        return null;
-    }
-
-    /**
-     * Answers an Enumeration of URLs containing all resources which can be
-     * found by looking up resName using the system class loader's resource
-     * lookup algorithm.
-     * 
-     * @return An Enumeration of URLs containing the system resources
-     * @param resName String the name of the resource to find.
-     */
-    public static Enumeration<URL> 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);
      * 
@@ -445,10 +442,9 @@
      * @return The Package created
      * @throws 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 {
+    protected Package definePackage(String name, String specTitle, String specVersion,
+            String specVendor, String implTitle, String implVersion, String implVendor,
+            URL sealBase) throws IllegalArgumentException {
         return null;
     }
 
@@ -547,8 +543,7 @@
      * @param libraryPath the library path to search, or null
      * @throws UnsatisfiedLinkError if the library could not be loaded
      */
-    static void loadLibraryWithPath(String libName, ClassLoader loader,
-            String libraryPath) {
+    static void loadLibraryWithPath(String libName, ClassLoader loader, String libraryPath) {
         return;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java?view=diff&rev=441341&r1=441340&r2=441341
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Compiler.java Thu Sep  7 19:19:16 2006
@@ -16,66 +16,63 @@
 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"
+ * This class must be implemented by the VM vendor. This class is a placeholder
+ * for environments which explicitly 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;
-	}
+    /**
+     * 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 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;
-	}
+    /**
+     * 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 disable() {
+        return;
+    }
 
-	/**
-	 * Disable the JIT compiler
-	 * 
-	 */
-	public static void enable() {
-		return;
-	};
+    /**
+     * Disable the JIT compiler
+     * 
+     */
+    public static void enable() {
+        return;
+    }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java?view=diff&rev=441341&r1=441340&r2=441341
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Object.java Thu Sep  7 19:19:16 2006
@@ -21,212 +21,203 @@
  * 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<? extends Object> 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;
-	};
+    /**
+     * 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.
+     * @throws 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.
+     * 
+     * @throws 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<? extends Object> 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.
+     * 
+     * @throws 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.
+     * @throws 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.
+     * @throws 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;
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Package.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Package.java?view=diff&rev=441341&r1=441340&r2=441341
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Package.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/Package.java Thu Sep  7 19:19:16 2006
@@ -77,8 +77,7 @@
      * @since 1.5
      * @see java.lang.reflect.AnnotatedElement#isAnnotationPresent(java.lang.Class)
      */
-    public boolean isAnnotationPresent(
-            Class<? extends Annotation> annotationType) {
+    public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
         return false;
     }
 
@@ -185,6 +184,7 @@
      * 
      * @return the receiver's hash
      */
+    @Override
     public int hashCode() {
         return 0;
     }
@@ -200,8 +200,7 @@
      * @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 {
+    public boolean isCompatibleWith(String version) throws NumberFormatException {
         return false;
     }
 
@@ -231,6 +230,7 @@
      * 
      * @return a printable representation for the receiver.
      */
+    @Override
     public String toString() {
         return null;
     }



Mime
View raw message