You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by mo...@apache.org on 2009/11/23 15:54:15 UTC

svn commit: r883384 [4/47] - in /incubator/kato/trunk/org.apache.kato: ./ kato.anttasks/src/main/java/org/apache/kato/anttasks/ kato.anttasks/src/main/java/org/apache/kato/anttasks/sitebuilder/ kato.anttasks/src/main/java/org/apache/kato/anttasks/tck/ ...

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java Mon Nov 23 15:53:48 2009
@@ -1,239 +1,239 @@
-/*******************************************************************************
- * 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 javax.tools.diagnostics.runtime.java;
-
-import java.util.List;
-
-import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.ImagePointer;
-
-
-
-/**
- * <p>
- * Represents a Java class.
- * <p>
- * A Java Class can have fields and methods. It is a shallow model of a loaded <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html">class file</a>
- * or special types such as array types or primitive types in the Java Virtual Machine.  
- * 
- */
-public interface JavaClass {
-
-    /**
-     * <p>
-     * Fetch the {@link java.lang.Class} object associated with this class.
-     * </p><p>
-     * In some implementations this may be null if no object has been
-     * created to represent this class, or if the class is synthetic.
-     * </p>
-     * @return the java.lang.Class object associated with this class 
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * 
-     * @see #getID()
-     */
-    JavaObject getObject() throws CorruptDataException; 
-
-    /**
-     * Fetch the class loader associated with this class. Classes defined in
-     * the bootstrap class loader (including classes representing primitive 
-     * types or void) will always return a JavaClassLoader representing the
-     * bootstrap class loader. This asymmetry with 
-     * java.lang.Class#getClassLoader() is intentional. 
-     * 
-     * @throws CorruptDataException if the class loader for this class cannot
-     * be found (a class cannot exist without a loader so this implies corruption)
-     * 
-     * @return the JavaClassLoader in which this class was defined
-     */
-    JavaClassLoader getClassLoader() throws CorruptDataException;
-    
-    /**
-     * <p>Get the name of the class in a form that follows the {@link java.lang.Class#getName()} definition.</p>
-     * <p>This method will always return a valid class name.</p>
-     *   
-     * @return the name of the class
-     * 
-     * @throws CorruptDataException  if the underlying data is in an unexpected state
-     */
-    String getName() throws CorruptDataException;
-    
-    /**
-     * <p>
-     * Get the  super class of this class.
-     * </p><p>
-     * Will return the superclass of this class or null if no superclass exists.
-     *</p><p> 
-     * For JavaClass instances representing interfaces, java.lang.Object, primitive types ( int,boolean,char etc) 
-     * and void, calling this method will return null.
-  	 *</p>
-     * @return the immediate superclass of this class, or null if this class has no superclass.
-     * 
-     * @throws CorruptDataException if the underlying data is in an unexpected state
-     */
-    JavaClass getSuperclass() throws CorruptDataException;
-    
-    
-    /**
-     * <p>Get the set of names of interfaces directly implemented by the class represented by this JavaClass.</p>
-     *<p>Some JVM implementations may choose to load interfaces lazily, so only the names are returned.</p>
-     *<p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
-     * 
-     * @return a list  of the names of interfaces directly implemented by this class. 
-     * 
-     * @see java.lang.String
-     * @see JavaClassLoader#findClass(String)
-     * @see javax.tools.diagnostics.image.CorruptData
-     */
-    List<String> getInterfaces();
-    
-    /**
-     * <p>
-     * Return the Java language modifiers for this class. 
-     * </p><p>
-     * The modifiers are defined by the <a href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#21613">JVM Specification</a>.
-     * </p><p>
-     * Note that, for inner classes, the actual modifiers are returned, not 
-     * the synthetic modifiers. For instance, a class will never have its
-     * 'protected' modifier set, even if the inner class was a protected
-     * member, since 'protected' is not a legal modifier for a class file.
-     * </p>
-     * @return the modifiers for this class
-     * @throws CorruptDataException if the underlying data is in an unexpected state
-     */
-    int getModifiers() throws CorruptDataException;
-    
-    /**
-     * This method returns true if the class represented by this JavaClass is an array class.
-     * 
-     * @return true if this class is an array class
-     * @throws CorruptDataException if the underlying data is in an unexpected state
-     */
-    boolean isArray() throws CorruptDataException;
-    
-    /**
-     * For array classes, returns a JavaClass representing the component type of this array class.
-     *
-     * @return a JavaClass representing the component type of this array class
-     * @throws CorruptDataException if the underlying data is in an unexpected state
-     * 
-     * @throws java.lang.IllegalArgumentException if this JavaClass does not represent an array class
-     */
-    JavaClass getComponentType() throws CorruptDataException;
-    
-    /**
-     * <p>Get the set of fields declared in this class.</p>
-     * <p>Fields declared in any superclass of this class are not returned.</p>
-     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
-     * 
-     * @return a list of fields declared in this class. 
-     * 
-     * @see JavaField
-     * @see javax.tools.diagnostics.image.CorruptData
-     */
-    List<JavaField> getDeclaredFields();
-    
-    /**
-     * <p>Get the set of methods declared in this class.</p>
-     * <p>Methods declared in any superclass of this class are not returned.</p>
-     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
- 
-     * @return a list of methods declared in this class.
-     * 
-     * @see JavaMethod
-     * @see javax.tools.diagnostics.image.CorruptData
-     */
-    List<JavaMethod> getDeclaredMethods();
-    
-    /**
-     * <p>
-     * Returns the list of constant pool references defined by this class.
-     * <p>
-     * Java classes may refer to other classes and to String objects via 
-     * the class's constant pool. These references are followed by the 
-     * garbage collector, forming edges on the graph of reachable objects.
-     * This getConstantPoolReferences() may be used to determine which
-     * objects are referred to by the receiver's constant pool.
-     * <p>
-     * Although Java VMs typically permit only Class and String 
-     * objects in the constant pool, some esoteric or future virtual 
-     * machines may permit other types of objects to occur in the constant 
-     * pool. This API imposes no restrictions on the types of JavaObjects 
-     * which might be included in the list.
-     * <p>
-     * No assumption should be made about the order in which constant 
-     * pool references are returned.
-     * <p>
-     * Classes may also refer to objects through static variables.
-     * These may be found with the getDeclaredFields() API. Objects
-     * referenced by static variables are not returned by 
-     * getConstantPoolReferences() unless the object is also referenced
-     * by the constant pool.
-     * 
-     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
-     * 
-     * @return a list of JavaObjects which are referred to by the constant pool of this class.
-     * 
-     * @see JavaObject
-     * @see javax.tools.diagnostics.image.CorruptData
-     */
-    List<JavaObject> getConstantPoolReferences();
-    
-    /**
-     * <p>
-     * The ID of a class is a pointer to a section of memory which identifies
-     * the class. The contents of this memory are implementation defined.
-     * <p>
-     * In some implementations getID() and getObject().getID() may return the
-     * same value. This implies that the class object is also the primary
-     * internal representation of the class. API users should not rely on this
-     * behaviour.
-     * <p>
-     * In some implementations, getID() may return null for some classes.
-     * 
-     * @return a pointer to the class
-     */
-	ImagePointer getID();
-	
-	/**
-	 * <p>
-	 * Get the set of references from this class. 
-	 * <p>
-	 * A reference is a object that represents the uni-directional relationship between objects and classes.
-	 * Objects and classes cannot be reclaimed by the Java Virtual Machine garbage collector if references exist
-	 * that can ultimately be traced back to root references.  see {@link JavaReference} for more detailed information.
-	 * <p>
-	 * Since this API can present entities that exist at any point in their lifecycle, it is possible to encounter an
-	 * JavaClass that is eligible for collection and thus no {@link JavaReference} can be found that refers to it.
-	 *   
-	 * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
-     * 
-     * @return a list of JavaReferences
-	 *
-	 * @see javax.tools.diagnostics.runtime.java.JavaReference
-	 * @see javax.tools.diagnostics.image.CorruptData
-	 */
-	List<JavaReference> getReferences();
-    
-	/**
-	 * @param obj
-	 * @return True if the given object refers to the same Java Class in the image
-	 */
-	public boolean equals(Object obj);
-	public int hashCode();
-}
+/*******************************************************************************
+ * 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 javax.tools.diagnostics.runtime.java;
+
+import java.util.List;
+
+import javax.tools.diagnostics.image.CorruptDataException;
+import javax.tools.diagnostics.image.ImagePointer;
+
+
+
+/**
+ * <p>
+ * Represents a Java class.
+ * <p>
+ * A Java Class can have fields and methods. It is a shallow model of a loaded <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html">class file</a>
+ * or special types such as array types or primitive types in the Java Virtual Machine.  
+ * 
+ */
+public interface JavaClass {
+
+    /**
+     * <p>
+     * Fetch the {@link java.lang.Class} object associated with this class.
+     * </p><p>
+     * In some implementations this may be null if no object has been
+     * created to represent this class, or if the class is synthetic.
+     * </p>
+     * @return the java.lang.Class object associated with this class 
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * 
+     * @see #getID()
+     */
+    JavaObject getObject() throws CorruptDataException; 
+
+    /**
+     * Fetch the class loader associated with this class. Classes defined in
+     * the bootstrap class loader (including classes representing primitive 
+     * types or void) will always return a JavaClassLoader representing the
+     * bootstrap class loader. This asymmetry with 
+     * java.lang.Class#getClassLoader() is intentional. 
+     * 
+     * @throws CorruptDataException if the class loader for this class cannot
+     * be found (a class cannot exist without a loader so this implies corruption)
+     * 
+     * @return the JavaClassLoader in which this class was defined
+     */
+    JavaClassLoader getClassLoader() throws CorruptDataException;
+    
+    /**
+     * <p>Get the name of the class in a form that follows the {@link java.lang.Class#getName()} definition.</p>
+     * <p>This method will always return a valid class name.</p>
+     *   
+     * @return the name of the class
+     * 
+     * @throws CorruptDataException  if the underlying data is in an unexpected state
+     */
+    String getName() throws CorruptDataException;
+    
+    /**
+     * <p>
+     * Get the  super class of this class.
+     * </p><p>
+     * Will return the superclass of this class or null if no superclass exists.
+     *</p><p> 
+     * For JavaClass instances representing interfaces, java.lang.Object, primitive types ( int,boolean,char etc) 
+     * and void, calling this method will return null.
+  	 *</p>
+     * @return the immediate superclass of this class, or null if this class has no superclass.
+     * 
+     * @throws CorruptDataException if the underlying data is in an unexpected state
+     */
+    JavaClass getSuperclass() throws CorruptDataException;
+    
+    
+    /**
+     * <p>Get the set of names of interfaces directly implemented by the class represented by this JavaClass.</p>
+     *<p>Some JVM implementations may choose to load interfaces lazily, so only the names are returned.</p>
+     *<p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned list is never null but could be empty.</p>
+     * 
+     * @return a list  of the names of interfaces directly implemented by this class. 
+     * 
+     * @see java.lang.String
+     * @see JavaClassLoader#findClass(String)
+     * @see javax.tools.diagnostics.image.CorruptData
+     */
+    List<String> getInterfaces();
+    
+    /**
+     * <p>
+     * Return the Java language modifiers for this class. 
+     * </p><p>
+     * The modifiers are defined by the <a href="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#21613">JVM Specification</a>.
+     * </p><p>
+     * Note that, for inner classes, the actual modifiers are returned, not 
+     * the synthetic modifiers. For instance, a class will never have its
+     * 'protected' modifier set, even if the inner class was a protected
+     * member, since 'protected' is not a legal modifier for a class file.
+     * </p>
+     * @return the modifiers for this class
+     * @throws CorruptDataException if the underlying data is in an unexpected state
+     */
+    int getModifiers() throws CorruptDataException;
+    
+    /**
+     * This method returns true if the class represented by this JavaClass is an array class.
+     * 
+     * @return true if this class is an array class
+     * @throws CorruptDataException if the underlying data is in an unexpected state
+     */
+    boolean isArray() throws CorruptDataException;
+    
+    /**
+     * For array classes, returns a JavaClass representing the component type of this array class.
+     *
+     * @return a JavaClass representing the component type of this array class
+     * @throws CorruptDataException if the underlying data is in an unexpected state
+     * 
+     * @throws java.lang.IllegalArgumentException if this JavaClass does not represent an array class
+     */
+    JavaClass getComponentType() throws CorruptDataException;
+    
+    /**
+     * <p>Get the set of fields declared in this class.</p>
+     * <p>Fields declared in any superclass of this class are not returned.</p>
+     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned list is never null but could be empty.</p>
+     * 
+     * @return a list of fields declared in this class. 
+     * 
+     * @see JavaField
+     * @see javax.tools.diagnostics.image.CorruptData
+     */
+    List<JavaField> getDeclaredFields();
+    
+    /**
+     * <p>Get the set of methods declared in this class.</p>
+     * <p>Methods declared in any superclass of this class are not returned.</p>
+     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned list is never null but could be empty.</p>
+ 
+     * @return a list of methods declared in this class.
+     * 
+     * @see JavaMethod
+     * @see javax.tools.diagnostics.image.CorruptData
+     */
+    List<JavaMethod> getDeclaredMethods();
+    
+    /**
+     * <p>
+     * Returns the list of constant pool references defined by this class.
+     * <p>
+     * Java classes may refer to other classes and to String objects via 
+     * the class's constant pool. These references are followed by the 
+     * garbage collector, forming edges on the graph of reachable objects.
+     * This getConstantPoolReferences() may be used to determine which
+     * objects are referred to by the receiver's constant pool.
+     * <p>
+     * Although Java VMs typically permit only Class and String 
+     * objects in the constant pool, some esoteric or future virtual 
+     * machines may permit other types of objects to occur in the constant 
+     * pool. This API imposes no restrictions on the types of JavaObjects 
+     * which might be included in the list.
+     * <p>
+     * No assumption should be made about the order in which constant 
+     * pool references are returned.
+     * <p>
+     * Classes may also refer to objects through static variables.
+     * These may be found with the getDeclaredFields() API. Objects
+     * referenced by static variables are not returned by 
+     * getConstantPoolReferences() unless the object is also referenced
+     * by the constant pool.
+     * 
+     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned list is never null but could be empty.</p>
+     * 
+     * @return a list of JavaObjects which are referred to by the constant pool of this class.
+     * 
+     * @see JavaObject
+     * @see javax.tools.diagnostics.image.CorruptData
+     */
+    List<JavaObject> getConstantPoolReferences();
+    
+    /**
+     * <p>
+     * The ID of a class is a pointer to a section of memory which identifies
+     * the class. The contents of this memory are implementation defined.
+     * <p>
+     * In some implementations getID() and getObject().getID() may return the
+     * same value. This implies that the class object is also the primary
+     * internal representation of the class. API users should not rely on this
+     * behaviour.
+     * <p>
+     * In some implementations, getID() may return null for some classes.
+     * 
+     * @return a pointer to the class
+     */
+	ImagePointer getID();
+	
+	/**
+	 * <p>
+	 * Get the set of references from this class. 
+	 * <p>
+	 * A reference is a object that represents the uni-directional relationship between objects and classes.
+	 * Objects and classes cannot be reclaimed by the Java Virtual Machine garbage collector if references exist
+	 * that can ultimately be traced back to root references.  see {@link JavaReference} for more detailed information.
+	 * <p>
+	 * Since this API can present entities that exist at any point in their lifecycle, it is possible to encounter an
+	 * JavaClass that is eligible for collection and thus no {@link JavaReference} can be found that refers to it.
+	 *   
+	 * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned list is never null but could be empty.</p>
+     * 
+     * @return a list of JavaReferences
+	 *
+	 * @see javax.tools.diagnostics.runtime.java.JavaReference
+	 * @see javax.tools.diagnostics.image.CorruptData
+	 */
+	List<JavaReference> getReferences();
+    
+	/**
+	 * @param obj
+	 * @return True if the given object refers to the same Java Class in the image
+	 */
+	public boolean equals(Object obj);
+	public int hashCode();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClassLoader.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClassLoader.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClassLoader.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClassLoader.java Mon Nov 23 15:53:48 2009
@@ -1,129 +1,129 @@
-/*******************************************************************************
- * 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 javax.tools.diagnostics.runtime.java;
-
-
-import java.util.List;
-
-import javax.tools.diagnostics.image.CorruptDataException;
-
-
-
-/**
- * <p>
- * Represents an internal ClassLoader structure within a Java Virtual Machine instance.
- * For most ClassLoaders there is a corresponding {@link java.lang.ClassLoader}
- * instance within with JavaRuntime. For primordial class loaders such as
- * the bootstrap class loader, there may or may not be a corresponding
- * {@link java.lang.ClassLoader} instance.
- * </p>
- * <p>
- * Since Java does not define any strict inheritance structure between
- * class loaders, there are no APIs for inspecting 'child' or 'parent'
- * class loaders. This information may be inferred by inspecting the
- * corresponding {@link java.lang.ClassLoader} instance:<p>
- * <i>pseudo javacode example</i>
- * <pre>
- * 		JavaClassLoader  loader;
- * 		JavaObject instance=loader.getObject();
- * 		String classLoaderName=instance.getJavaClass().getName();
- * 
- * </pre>
- * 
- * @see java.lang.ClassLoader
- */
-public interface JavaClassLoader {
-
-    /**
-     * <p>
-     * Get the set of classes which are defined in this JavaClassLoader.
-     * Calling the {@link JavaClass#getClassLoader()} method on objects  returned in this list will
-     * return this JavaClassLoader</p>
-     *    
-     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned value is never null but can be an empty list.</p>
-     *   
-     * @return an list of classes which are defined in this JavaClassLoader 
-     * @see JavaClass
-     */
-    List<JavaClass> getDefinedClasses();
-    
-    /**
-     * <p>
-     * When a ClassLoader successfully delegates a findClass() request to
-     * another ClassLoader, the result of the delegation must be cached within
-     * the internal structure so that the Java Virtual Machine does not make repeated requests
-     * for the same class.
-     * </p>
-     * The contents of the returned list is a superset of that returned by {@link #getDefinedClasses()}
-     * <p>
-     * The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned value is never null but can be an empty list.</p>
-     * 
-     * @return a list of classes which are defined  in this JavaClassLoader 
-     * <i>or</i> which were found by delegation to other JavaClassLoaders
-     * 
-     * @see JavaClass
-     */
-    List<JavaClass> getCachedClasses();
-    
-    /**
-     * <p>
-     * Find a class by name within this class loader. The class may have been
-     * defined in this class loader, or this class loader may have delegated
-     * the load to another class loader and cached the result.
-     *<p>
-     * The form of the name presented to this method should be as follows
-     * <pre>
-     * [ packagenamepart / ... ] (classname ) [ $innerclassname ...]
-     * </pre>
-     * <p>
-     * <i>Examples</i>
-     * </p>
-     * <ul>
-     * <li>To find the JavaClass that represents "java.lang.String" use findClass("java/lang/String")</li>
-     * <li>To find the JavaClass that represents "Foo.InnerClass.InnerInnerClass" in the default package use findClass("Foo$InnerClass$InnerInnerClass")</li>
-     * <li>To fine the JavaClass that represents "java.util.Map.Entry usefindClass("java/util/Map$Entry")
-     * </ul> 
-     * 
-     * @param name of the class to find. Packages should be separated by
-     * '/' instead of '.'
-     * @return the JavaClass instance, or null if it is not found
-     * @throws CorruptDataException if the underlying data is in an unexpected state
-     */
-    JavaClass findClass(String name) throws CorruptDataException;
-    
-    /**
-     * Get the {@link java.lang.ClassLoader} instance (represented by a {@link JavaObject} 
-     * associated with this class loader. If there is no associated class loader, for example the
-     * system class loader , then  null will be returned.
-     * 
-     * Further examination of the returned object is implementation specific.
-     *  
-     * @return a JavaObject representing the {@link java.lang.ClassLoader} instance
-     * 
-     * @throws CorruptDataException if the underlying data is in an unexpected state
-     * 
-     * @see JavaObject
-     * @see ClassLoader
-     */
-    JavaObject getObject() throws CorruptDataException;
-    
-	/**
-	 * @param obj
-	 * @return True if the given object refers to the same Java Class Loader in the image
-	 */
-	public boolean equals(Object obj);
-	public int hashCode();
-}
+/*******************************************************************************
+ * 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 javax.tools.diagnostics.runtime.java;
+
+
+import java.util.List;
+
+import javax.tools.diagnostics.image.CorruptDataException;
+
+
+
+/**
+ * <p>
+ * Represents an internal ClassLoader structure within a Java Virtual Machine instance.
+ * For most ClassLoaders there is a corresponding {@link java.lang.ClassLoader}
+ * instance within with JavaRuntime. For primordial class loaders such as
+ * the bootstrap class loader, there may or may not be a corresponding
+ * {@link java.lang.ClassLoader} instance.
+ * </p>
+ * <p>
+ * Since Java does not define any strict inheritance structure between
+ * class loaders, there are no APIs for inspecting 'child' or 'parent'
+ * class loaders. This information may be inferred by inspecting the
+ * corresponding {@link java.lang.ClassLoader} instance:<p>
+ * <i>pseudo javacode example</i>
+ * <pre>
+ * 		JavaClassLoader  loader;
+ * 		JavaObject instance=loader.getObject();
+ * 		String classLoaderName=instance.getJavaClass().getName();
+ * 
+ * </pre>
+ * 
+ * @see java.lang.ClassLoader
+ */
+public interface JavaClassLoader {
+
+    /**
+     * <p>
+     * Get the set of classes which are defined in this JavaClassLoader.
+     * Calling the {@link JavaClass#getClassLoader()} method on objects  returned in this list will
+     * return this JavaClassLoader</p>
+     *    
+     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned value is never null but can be an empty list.</p>
+     *   
+     * @return an list of classes which are defined in this JavaClassLoader 
+     * @see JavaClass
+     */
+    List<JavaClass> getDefinedClasses();
+    
+    /**
+     * <p>
+     * When a ClassLoader successfully delegates a findClass() request to
+     * another ClassLoader, the result of the delegation must be cached within
+     * the internal structure so that the Java Virtual Machine does not make repeated requests
+     * for the same class.
+     * </p>
+     * The contents of the returned list is a superset of that returned by {@link #getDefinedClasses()}
+     * <p>
+     * The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned value is never null but can be an empty list.</p>
+     * 
+     * @return a list of classes which are defined  in this JavaClassLoader 
+     * <i>or</i> which were found by delegation to other JavaClassLoaders
+     * 
+     * @see JavaClass
+     */
+    List<JavaClass> getCachedClasses();
+    
+    /**
+     * <p>
+     * Find a class by name within this class loader. The class may have been
+     * defined in this class loader, or this class loader may have delegated
+     * the load to another class loader and cached the result.
+     *<p>
+     * The form of the name presented to this method should be as follows
+     * <pre>
+     * [ packagenamepart / ... ] (classname ) [ $innerclassname ...]
+     * </pre>
+     * <p>
+     * <i>Examples</i>
+     * </p>
+     * <ul>
+     * <li>To find the JavaClass that represents "java.lang.String" use findClass("java/lang/String")</li>
+     * <li>To find the JavaClass that represents "Foo.InnerClass.InnerInnerClass" in the default package use findClass("Foo$InnerClass$InnerInnerClass")</li>
+     * <li>To fine the JavaClass that represents "java.util.Map.Entry usefindClass("java/util/Map$Entry")
+     * </ul> 
+     * 
+     * @param name of the class to find. Packages should be separated by
+     * '/' instead of '.'
+     * @return the JavaClass instance, or null if it is not found
+     * @throws CorruptDataException if the underlying data is in an unexpected state
+     */
+    JavaClass findClass(String name) throws CorruptDataException;
+    
+    /**
+     * Get the {@link java.lang.ClassLoader} instance (represented by a {@link JavaObject} 
+     * associated with this class loader. If there is no associated class loader, for example the
+     * system class loader , then  null will be returned.
+     * 
+     * Further examination of the returned object is implementation specific.
+     *  
+     * @return a JavaObject representing the {@link java.lang.ClassLoader} instance
+     * 
+     * @throws CorruptDataException if the underlying data is in an unexpected state
+     * 
+     * @see JavaObject
+     * @see ClassLoader
+     */
+    JavaObject getObject() throws CorruptDataException;
+    
+	/**
+	 * @param obj
+	 * @return True if the given object refers to the same Java Class Loader in the image
+	 */
+	public boolean equals(Object obj);
+	public int hashCode();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaClassLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaField.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaField.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaField.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaField.java Mon Nov 23 15:53:48 2009
@@ -1,184 +1,184 @@
-/*******************************************************************************
- * 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 javax.tools.diagnostics.runtime.java;
-
-import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.MemoryAccessException;
-
-/**
- * <p>
- * Represents a field declaration.
- * It is modelled on {@link java.lang.reflect.Field}
- */
-public interface JavaField extends JavaMember {
-
-    /**
-     * <p>
-     * Get the contents of an Object field
-     * 
-     * @param object to fetch the field from. Ignored for static
-     * fields.
-     * 
-     * 
-     * <p>
-     * This field must be declared in the object's class or in a superclass
-     * <p>
-     * @return a JavaObject instance for reference type fields,
-     * an instance of a subclass of Number, Boolean, or Character 
-     * for primitive fields, or null for null reference fields.
-     * 
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException  
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field
-     *
-     * @see JavaObject
-     * @see Byte
-     * @see Double
-     * @see Float
-     * @see Integer
-     * @see Long
-     * @see Short
-     * @see Character
-     * @see Boolean
-     */
-    Object get(JavaObject object) throws CorruptDataException, MemoryAccessException;
-
-    /**
-     * <p>
-     * Get the contents of a boolean field
-     * @param  object to fetch the field from. Ignored for static fields.
-     * @return the field contents
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field, or if the type of the field cannot be converted to boolean
-     */
-    boolean getBoolean(JavaObject object) throws CorruptDataException, MemoryAccessException;
-
-    /**
-     * <p>
-     * Get the contents of a byte field
-     * @param  object to fetch the field from. Ignored for static fields.
-     * @return the field contents
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field, or if the type of the field cannot be converted to byte
-     */
-    byte getByte(JavaObject object) throws CorruptDataException, MemoryAccessException;
-
-    /**
-     * <p>
-     * Get the contents of a char field
-     * @param  object to fetch the field from. Ignored for static fields.
-     * @return the field contents
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field, or if the type of the field cannot be converted to char
-     */
-    char getChar(JavaObject object) throws CorruptDataException, MemoryAccessException;
-
-    /**
-     * <p>
-     * Get the contents of a double field or of another primitive field whose type is convertible to double via a widening conversion. 
-     * @param  object to fetch the field from. Ignored for static fields.
-     * @return the field contents
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field, or if the type of the field cannot be converted to double via a widening conversion
-     */
-    double getDouble(JavaObject object) throws CorruptDataException, MemoryAccessException;
-
-    /**
-     * <p>
-     * Get the contents of a float field or of another primitive field whose type is convertible to float via a widening conversion. 
-     * @param  object to fetch the field from. Ignored for static fields.
-     * @return the field contents 
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field, or if the type of the field cannot be converted to float via a widening conversion
-     */
-    float getFloat(JavaObject object) throws CorruptDataException, MemoryAccessException;
-
-    /**
-     * <p>
-     * Get the contents of an int field or of another primitive field whose type is convertible to int via a widening conversion.
-     * @return the field contents
-     * @param  object to fetch the field from. Ignored for static fields.
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field, or if the type of the field cannot be converted to int via a widening conversion.
-     */
-    int getInt(JavaObject object) throws CorruptDataException, MemoryAccessException;
-
-    /**
-     * <p>
-     * Get the contents of a long field or of another primitive field whose type is convertible to long via a widening conversion.
-     * @param  object to fetch the field from. Ignored for static fields.
-     * @return the field contents
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field, or if the type of the field cannot be converted to long via a widening conversion.
-     */
-    long getLong(JavaObject object) throws CorruptDataException, MemoryAccessException;
-
-    /**
-     * <p>
-     * Get the contents of a short field or of another primitive field whose type is convertible to short via a widening conversion.
-     * @param  object to fetch the field from. Ignored for static fields.
-     * @return the field contents 
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * @throws NullPointerException if the field is an instance field, and object is null
-     * @throws IllegalArgumentException if the specified object is not appropriate for
-     * this field, or if the type of the field cannot be converted to short via a widening conversion.
-     */
-    short getShort(JavaObject object) throws CorruptDataException, MemoryAccessException;
-    
-    /**
-     * <p>
-     * Get the contents of a string field
-     * @param object to fetch the field from. Ignored for static fields.
-     * 
-     * @return a String representing the value of the String field.  Note that the instance
-     * returned can be null if the field was null in object.
-     * @throws CorruptDataException if the underlying data is in an unexpected state 
-     * @throws MemoryAccessException 
-     * 
-     * @throws IllegalArgumentException if the specified field is not a String
-     * @throws NullPointerException if the field is an instance field, and object is null
-     */
-    String getString(JavaObject object) throws CorruptDataException, MemoryAccessException;
-    
-	/**
-	 * @param obj
-	 * @return True if the given object refers to the same Java Field in the image
-	 */
-	public boolean equals(Object obj);
-	public int hashCode();
-}
+/*******************************************************************************
+ * 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 javax.tools.diagnostics.runtime.java;
+
+import javax.tools.diagnostics.image.CorruptDataException;
+import javax.tools.diagnostics.image.MemoryAccessException;
+
+/**
+ * <p>
+ * Represents a field declaration.
+ * It is modelled on {@link java.lang.reflect.Field}
+ */
+public interface JavaField extends JavaMember {
+
+    /**
+     * <p>
+     * Get the contents of an Object field
+     * 
+     * @param object to fetch the field from. Ignored for static
+     * fields.
+     * 
+     * 
+     * <p>
+     * This field must be declared in the object's class or in a superclass
+     * <p>
+     * @return a JavaObject instance for reference type fields,
+     * an instance of a subclass of Number, Boolean, or Character 
+     * for primitive fields, or null for null reference fields.
+     * 
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException  
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field
+     *
+     * @see JavaObject
+     * @see Byte
+     * @see Double
+     * @see Float
+     * @see Integer
+     * @see Long
+     * @see Short
+     * @see Character
+     * @see Boolean
+     */
+    Object get(JavaObject object) throws CorruptDataException, MemoryAccessException;
+
+    /**
+     * <p>
+     * Get the contents of a boolean field
+     * @param  object to fetch the field from. Ignored for static fields.
+     * @return the field contents
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field, or if the type of the field cannot be converted to boolean
+     */
+    boolean getBoolean(JavaObject object) throws CorruptDataException, MemoryAccessException;
+
+    /**
+     * <p>
+     * Get the contents of a byte field
+     * @param  object to fetch the field from. Ignored for static fields.
+     * @return the field contents
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field, or if the type of the field cannot be converted to byte
+     */
+    byte getByte(JavaObject object) throws CorruptDataException, MemoryAccessException;
+
+    /**
+     * <p>
+     * Get the contents of a char field
+     * @param  object to fetch the field from. Ignored for static fields.
+     * @return the field contents
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field, or if the type of the field cannot be converted to char
+     */
+    char getChar(JavaObject object) throws CorruptDataException, MemoryAccessException;
+
+    /**
+     * <p>
+     * Get the contents of a double field or of another primitive field whose type is convertible to double via a widening conversion. 
+     * @param  object to fetch the field from. Ignored for static fields.
+     * @return the field contents
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field, or if the type of the field cannot be converted to double via a widening conversion
+     */
+    double getDouble(JavaObject object) throws CorruptDataException, MemoryAccessException;
+
+    /**
+     * <p>
+     * Get the contents of a float field or of another primitive field whose type is convertible to float via a widening conversion. 
+     * @param  object to fetch the field from. Ignored for static fields.
+     * @return the field contents 
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field, or if the type of the field cannot be converted to float via a widening conversion
+     */
+    float getFloat(JavaObject object) throws CorruptDataException, MemoryAccessException;
+
+    /**
+     * <p>
+     * Get the contents of an int field or of another primitive field whose type is convertible to int via a widening conversion.
+     * @return the field contents
+     * @param  object to fetch the field from. Ignored for static fields.
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field, or if the type of the field cannot be converted to int via a widening conversion.
+     */
+    int getInt(JavaObject object) throws CorruptDataException, MemoryAccessException;
+
+    /**
+     * <p>
+     * Get the contents of a long field or of another primitive field whose type is convertible to long via a widening conversion.
+     * @param  object to fetch the field from. Ignored for static fields.
+     * @return the field contents
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field, or if the type of the field cannot be converted to long via a widening conversion.
+     */
+    long getLong(JavaObject object) throws CorruptDataException, MemoryAccessException;
+
+    /**
+     * <p>
+     * Get the contents of a short field or of another primitive field whose type is convertible to short via a widening conversion.
+     * @param  object to fetch the field from. Ignored for static fields.
+     * @return the field contents 
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * @throws NullPointerException if the field is an instance field, and object is null
+     * @throws IllegalArgumentException if the specified object is not appropriate for
+     * this field, or if the type of the field cannot be converted to short via a widening conversion.
+     */
+    short getShort(JavaObject object) throws CorruptDataException, MemoryAccessException;
+    
+    /**
+     * <p>
+     * Get the contents of a string field
+     * @param object to fetch the field from. Ignored for static fields.
+     * 
+     * @return a String representing the value of the String field.  Note that the instance
+     * returned can be null if the field was null in object.
+     * @throws CorruptDataException if the underlying data is in an unexpected state 
+     * @throws MemoryAccessException 
+     * 
+     * @throws IllegalArgumentException if the specified field is not a String
+     * @throws NullPointerException if the field is an instance field, and object is null
+     */
+    String getString(JavaObject object) throws CorruptDataException, MemoryAccessException;
+    
+	/**
+	 * @param obj
+	 * @return True if the given object refers to the same Java Field in the image
+	 */
+	public boolean equals(Object obj);
+	public int hashCode();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java Mon Nov 23 15:53:48 2009
@@ -1,78 +1,78 @@
-/*******************************************************************************
- * 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 javax.tools.diagnostics.runtime.java;
-
-import java.util.List;
-
-import javax.tools.diagnostics.image.ImageSection;
-
-/**
- * Represents a single heap of managed objects.
- * 
- * The heap can be viewed as an unordered collection of JavaObjects or as a region of storage 
- * within the Java Virtual Machiine instance. 
- * 
- * The heap commonly contains JavaObject instances that are reachable by navigating chains of {@link JavaReference}
- * These references can be obtained from the {@link JavaRuntime#getHeapRoots()} method.
- * 
- * A heap can contain instances which cannot be reached by the use of {@link JavaReference}  
- * 
- */
-public interface JavaHeap {
-    
-    /**
-     * Get the set of memory regions that represent the memory layout of the heap.
-     * The actual make up of this list is implementation specific.
-     * 
-     * The returned list follows the standard semantics for javax.tools.diagnostics collections.
-     * 
-     * The returned value is never null but can be an empty list.
-     *
-     * @return a list  of {@link ImageSection} instances 
-     * 
-     * 
-     * @see javax.tools.diagnostics.image.ImageSection
-     */
-    List<ImageSection> getSections();
-    
-    /**
-     * Get a brief textual description of this heap.
-     * The value returned is  implementation specific.
-     * 
-     * The returned value is never null.
-     * 
-     * @return a brief textual description of this heap
-     */
-    String getName();
-    
-    /**
-     * Get the set of objects which are stored in this heap.
-     * 
-     * @return a list  of {@link JavaObject} objects which are stored in this heap
-     * 
-     * The returned list follows the standard semantics for javax.tools.diagnostics collections.
-     * 
-     * The returned value is never null but can be an empty list.
-     * 
-     * @see JavaObject
-     */
-    List<JavaObject> getObjects();
-    
-	/**
-	 * @param obj
-	 * @return true if the given object refers to the same Java Heap in the image
-	 */
-	public boolean equals(Object obj);
-	public int hashCode();
-}
+/*******************************************************************************
+ * 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 javax.tools.diagnostics.runtime.java;
+
+import java.util.List;
+
+import javax.tools.diagnostics.image.ImageSection;
+
+/**
+ * Represents a single heap of managed objects.
+ * 
+ * The heap can be viewed as an unordered collection of JavaObjects or as a region of storage 
+ * within the Java Virtual Machiine instance. 
+ * 
+ * The heap commonly contains JavaObject instances that are reachable by navigating chains of {@link JavaReference}
+ * These references can be obtained from the {@link JavaRuntime#getHeapRoots()} method.
+ * 
+ * A heap can contain instances which cannot be reached by the use of {@link JavaReference}  
+ * 
+ */
+public interface JavaHeap {
+    
+    /**
+     * Get the set of memory regions that represent the memory layout of the heap.
+     * The actual make up of this list is implementation specific.
+     * 
+     * The returned list follows the standard semantics for javax.tools.diagnostics collections.
+     * 
+     * The returned value is never null but can be an empty list.
+     *
+     * @return a list  of {@link ImageSection} instances 
+     * 
+     * 
+     * @see javax.tools.diagnostics.image.ImageSection
+     */
+    List<ImageSection> getSections();
+    
+    /**
+     * Get a brief textual description of this heap.
+     * The value returned is  implementation specific.
+     * 
+     * The returned value is never null.
+     * 
+     * @return a brief textual description of this heap
+     */
+    String getName();
+    
+    /**
+     * Get the set of objects which are stored in this heap.
+     * 
+     * @return a list  of {@link JavaObject} objects which are stored in this heap
+     * 
+     * The returned list follows the standard semantics for javax.tools.diagnostics collections.
+     * 
+     * The returned value is never null but can be an empty list.
+     * 
+     * @see JavaObject
+     */
+    List<JavaObject> getObjects();
+    
+	/**
+	 * @param obj
+	 * @return true if the given object refers to the same Java Heap in the image
+	 */
+	public boolean equals(Object obj);
+	public int hashCode();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaHeap.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java Mon Nov 23 15:53:48 2009
@@ -1,112 +1,112 @@
-/*******************************************************************************
- * 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 javax.tools.diagnostics.runtime.java;
-
-import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.image.ImagePointer;
-
-/**
- * <p>
- * Represents a point of execution within a Java method
- * 
- */
-public interface JavaLocation {
-	
-	/**
-	 * <p>
-	 * Fetches the absolute address of the code which this location represents.
-	 * This pointer will be contained within one of the segments returned by
-	 * getBytecodeSections() or getCompiledSections() of the method returned by
-	 * getMethod().
-	 * <p>
-	 * null may be returned, particularly for methods with no bytecode or 
-	 * compiled sections (e.g. some native methods)
-	 * <p>
-	 * Although an offset into the method may be calculated using this 
-	 * pointer, caution should be exercised in attempting to map this offset to
-	 * an offset within the original class file. Various transformations may
-	 * have been applied to the bytecodes by the VM or other agents which may
-	 * make the offset difficult to interpret.
-	 * <p>
-	 * For native methods, the address may be meaningless.
-	 * 
-	 * @return the address in memory of the managed code
-	 * @throws CorruptDataException if the underlying data is in an unexpected state 
-	 */
-	ImagePointer getAddress() throws CorruptDataException;
-	
-	/**
-	 * <p>
-	 * Get the line number.
-	 * <p>
-	 * @return the line number, if available, or throws DataUnavailable if it is not available
-	 * Line numbers are counted from 1  
-	 * 
-	 * @throws DataUnavailable if the line number data is not available for this location
-	 * @throws CorruptDataException if the underlying data is in an unexpected state 
-	 */
-	int getLineNumber() throws DataUnavailable, CorruptDataException;
-	
-	/**
-	 * <p>
-	 * Get the source file name.
-	 * 
-	 * @return the name of the source file, if available, or throws DataUnavailable if it is
-	 * not available
-	 * 
-	 * @throws DataUnavailable if the source file name is unavailable in the core
-	 * @throws CorruptDataException  if the underlying data is in an unexpected state 
-	 */
-	String getFilename() throws DataUnavailable, CorruptDataException;
-	
-	/**
-	 * <p>
-	 * Get the compilation level for this location. This is an implementation 
-	 * defined number indicating the level at which the current location was 
-	 * compiled. 0 indicates interpreted. Any positive number indicates some 
-	 * level of JIT compilation. Typically, higher numbers indicate more 
-	 * aggressive compilation strategies
-	 * <p>
-	 * For native methods, a non-zero compilation level indicates that some
-	 * level of JIT compilation has been applied to the native call (e.g. a
-	 * custom native call stub). To determine if the method is native, use
-	 * getMethod().getModifiers().
-	 * 
-	 * @return the compilation level 
-	 * @throws CorruptDataException if the underlying data is in an unexpected state  
-	 */
-	int getCompilationLevel() throws CorruptDataException;
-	
-	/**
-	 * <p>
-	 * Get the method which contains the point of execution.
-	 * 
-	 * @return the method which contains the point of execution
-	 * @throws CorruptDataException if the underlying data is in an unexpected state  
-	 */
-	JavaMethod getMethod() throws CorruptDataException;
-	
-	/**
-	 * @return A string representing the location as it would be seen in a Java stack trace
-	 */
-	public String toString();
-	
-	/**
-	 * @param obj
-	 * @return True if the given object refers to the same Java Location in the image
-	 */
-	public boolean equals(Object obj);
-	public int hashCode();
-}
+/*******************************************************************************
+ * 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 javax.tools.diagnostics.runtime.java;
+
+import javax.tools.diagnostics.image.CorruptDataException;
+import javax.tools.diagnostics.image.DataUnavailable;
+import javax.tools.diagnostics.image.ImagePointer;
+
+/**
+ * <p>
+ * Represents a point of execution within a Java method
+ * 
+ */
+public interface JavaLocation {
+	
+	/**
+	 * <p>
+	 * Fetches the absolute address of the code which this location represents.
+	 * This pointer will be contained within one of the segments returned by
+	 * getBytecodeSections() or getCompiledSections() of the method returned by
+	 * getMethod().
+	 * <p>
+	 * null may be returned, particularly for methods with no bytecode or 
+	 * compiled sections (e.g. some native methods)
+	 * <p>
+	 * Although an offset into the method may be calculated using this 
+	 * pointer, caution should be exercised in attempting to map this offset to
+	 * an offset within the original class file. Various transformations may
+	 * have been applied to the bytecodes by the VM or other agents which may
+	 * make the offset difficult to interpret.
+	 * <p>
+	 * For native methods, the address may be meaningless.
+	 * 
+	 * @return the address in memory of the managed code
+	 * @throws CorruptDataException if the underlying data is in an unexpected state 
+	 */
+	ImagePointer getAddress() throws CorruptDataException;
+	
+	/**
+	 * <p>
+	 * Get the line number.
+	 * <p>
+	 * @return the line number, if available, or throws DataUnavailable if it is not available
+	 * Line numbers are counted from 1  
+	 * 
+	 * @throws DataUnavailable if the line number data is not available for this location
+	 * @throws CorruptDataException if the underlying data is in an unexpected state 
+	 */
+	int getLineNumber() throws DataUnavailable, CorruptDataException;
+	
+	/**
+	 * <p>
+	 * Get the source file name.
+	 * 
+	 * @return the name of the source file, if available, or throws DataUnavailable if it is
+	 * not available
+	 * 
+	 * @throws DataUnavailable if the source file name is unavailable in the core
+	 * @throws CorruptDataException  if the underlying data is in an unexpected state 
+	 */
+	String getFilename() throws DataUnavailable, CorruptDataException;
+	
+	/**
+	 * <p>
+	 * Get the compilation level for this location. This is an implementation 
+	 * defined number indicating the level at which the current location was 
+	 * compiled. 0 indicates interpreted. Any positive number indicates some 
+	 * level of JIT compilation. Typically, higher numbers indicate more 
+	 * aggressive compilation strategies
+	 * <p>
+	 * For native methods, a non-zero compilation level indicates that some
+	 * level of JIT compilation has been applied to the native call (e.g. a
+	 * custom native call stub). To determine if the method is native, use
+	 * getMethod().getModifiers().
+	 * 
+	 * @return the compilation level 
+	 * @throws CorruptDataException if the underlying data is in an unexpected state  
+	 */
+	int getCompilationLevel() throws CorruptDataException;
+	
+	/**
+	 * <p>
+	 * Get the method which contains the point of execution.
+	 * 
+	 * @return the method which contains the point of execution
+	 * @throws CorruptDataException if the underlying data is in an unexpected state  
+	 */
+	JavaMethod getMethod() throws CorruptDataException;
+	
+	/**
+	 * @return A string representing the location as it would be seen in a Java stack trace
+	 */
+	public String toString();
+	
+	/**
+	 * @param obj
+	 * @return True if the given object refers to the same Java Location in the image
+	 */
+	public boolean equals(Object obj);
+	public int hashCode();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaLocation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMember.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMember.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMember.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMember.java Mon Nov 23 15:53:48 2009
@@ -1,71 +1,71 @@
-/*******************************************************************************
- * 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 javax.tools.diagnostics.runtime.java;
-
-import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.image.DataUnavailable;
-
-/**
- * <p>
- * Abstract interface which both JavaField and JavaMethod inherit from.
- * It defines APIs which are common to both types of members.
- * It is modelled on java.lang.reflect.Member
- */
-public interface JavaMember {
-
-	/**
-	 * <p>
-	 * Get the set of modifiers for this field or method - a set of bits
-	 * The values for the constants representing the modifiers can be obtained from {@link java.lang.reflect.Modifier}.
-
-	 * @return the modifiers for this field or method. 
-	 * @throws CorruptDataException if the underlying data is in an unexpected state  
-     *
-     */
-    int getModifiers()  throws CorruptDataException;
-
-    /**
-     * <p>
-     * Get the class which declares this field or method
-     * 
-     * @return the JavaClass which declared this field or method
-     * @throws CorruptDataException if the underlying data is in an unexpected state  
-     * @throws DataUnavailable if there is no declaring class available
-     */
-    JavaClass getDeclaringClass() throws CorruptDataException, DataUnavailable;
-    
-    /**
-     * <p>
-     * Get the name of the field or method
-     * @return the name of the field or method
-     * @throws CorruptDataException if the underlying data is in an unexpected state  
-     */
-    String getName()  throws CorruptDataException;
-    
-    /**
-     * <p>
-     * Get the signature of the field or method
-     * @return the signature of the field or method.
-     * e.g. "(Ljava/lang/String;)V"
-     * @throws CorruptDataException if the underlying data is in an unexpected state  
-     */
-    String getSignature()  throws CorruptDataException;
-    
-	/**
-	 * @param obj
-	 * @return True if the given object refers to the same Java Member in the image
-	 */
-	public boolean equals(Object obj);
-	public int hashCode();
-}
+/*******************************************************************************
+ * 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 javax.tools.diagnostics.runtime.java;
+
+import javax.tools.diagnostics.image.CorruptDataException;
+import javax.tools.diagnostics.image.DataUnavailable;
+
+/**
+ * <p>
+ * Abstract interface which both JavaField and JavaMethod inherit from.
+ * It defines APIs which are common to both types of members.
+ * It is modelled on java.lang.reflect.Member
+ */
+public interface JavaMember {
+
+	/**
+	 * <p>
+	 * Get the set of modifiers for this field or method - a set of bits
+	 * The values for the constants representing the modifiers can be obtained from {@link java.lang.reflect.Modifier}.
+
+	 * @return the modifiers for this field or method. 
+	 * @throws CorruptDataException if the underlying data is in an unexpected state  
+     *
+     */
+    int getModifiers()  throws CorruptDataException;
+
+    /**
+     * <p>
+     * Get the class which declares this field or method
+     * 
+     * @return the JavaClass which declared this field or method
+     * @throws CorruptDataException if the underlying data is in an unexpected state  
+     * @throws DataUnavailable if there is no declaring class available
+     */
+    JavaClass getDeclaringClass() throws CorruptDataException, DataUnavailable;
+    
+    /**
+     * <p>
+     * Get the name of the field or method
+     * @return the name of the field or method
+     * @throws CorruptDataException if the underlying data is in an unexpected state  
+     */
+    String getName()  throws CorruptDataException;
+    
+    /**
+     * <p>
+     * Get the signature of the field or method
+     * @return the signature of the field or method.
+     * e.g. "(Ljava/lang/String;)V"
+     * @throws CorruptDataException if the underlying data is in an unexpected state  
+     */
+    String getSignature()  throws CorruptDataException;
+    
+	/**
+	 * @param obj
+	 * @return True if the given object refers to the same Java Member in the image
+	 */
+	public boolean equals(Object obj);
+	public int hashCode();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMember.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java?rev=883384&r1=883383&r2=883384&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java (original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java Mon Nov 23 15:53:48 2009
@@ -1,85 +1,85 @@
-/*******************************************************************************
- * 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 javax.tools.diagnostics.runtime.java;
-
-import java.util.List;
-
-import javax.tools.diagnostics.image.ImageSection;
-
-
-/**
- * <p>
- * Represents a method or constructor in a class
- */
-public interface JavaMethod extends JavaMember {
-
-    /**
-     * <p>
-     * Get the set of ImageSections containing the bytecode of this method.
-     * <p>
-     * Each ImageSection contains data (usually bytecodes) used
-     * in executing this method in interpreted mode. 
-     * <p>
-     * The collection may be empty for native methods, or
-     * pre-compiled methods.
-     * <p>
-     * Typically, the collection will contain no more than one
-     * section, but this is not guaranteed.
-     *  
-     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
-     * @return a list of ImageSections.
-     * 
-     * 
-     * @see javax.tools.diagnostics.image.ImageSection
-     */
-    List<ImageSection> getBytecodeSections();
-
-    /**
-     * <p>
-     * Get the set of ImageSections containing the compiled code of this method.
-     * <p>
-     * Each ImageSection contains data (usually executable code) used
-     * in executing this method in compiled mode.
-     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
-     * 
-     * @return a list of ImageSections.
-     * 
-     * @see javax.tools.diagnostics.image.ImageSection
-     * 
-     */
-    List<ImageSection> getCompiledSections();
-    
-    
-    /**
-     * <p>
-     * An experimental addition to the API.
-     * <p>
-     * Get the set of {@link JavaVariable} objects
-     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
-     * <p>The returned list is never null but could be empty.</p>
-     * 
-     * @return List of JavaVariable objects available
-     *  
-     */
-    List<JavaVariable> getVariables();  
-    
-	/**
-	 * @param obj
-	 * @return True if the given object refers to the same JavaMethod in the image
-	 */
-	public boolean equals(Object obj);
-	public int hashCode();
-}
+/*******************************************************************************
+ * 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 javax.tools.diagnostics.runtime.java;
+
+import java.util.List;
+
+import javax.tools.diagnostics.image.ImageSection;
+
+
+/**
+ * <p>
+ * Represents a method or constructor in a class
+ */
+public interface JavaMethod extends JavaMember {
+
+    /**
+     * <p>
+     * Get the set of ImageSections containing the bytecode of this method.
+     * <p>
+     * Each ImageSection contains data (usually bytecodes) used
+     * in executing this method in interpreted mode. 
+     * <p>
+     * The collection may be empty for native methods, or
+     * pre-compiled methods.
+     * <p>
+     * Typically, the collection will contain no more than one
+     * section, but this is not guaranteed.
+     *  
+     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned list is never null but could be empty.</p>
+     * @return a list of ImageSections.
+     * 
+     * 
+     * @see javax.tools.diagnostics.image.ImageSection
+     */
+    List<ImageSection> getBytecodeSections();
+
+    /**
+     * <p>
+     * Get the set of ImageSections containing the compiled code of this method.
+     * <p>
+     * Each ImageSection contains data (usually executable code) used
+     * in executing this method in compiled mode.
+     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned list is never null but could be empty.</p>
+     * 
+     * @return a list of ImageSections.
+     * 
+     * @see javax.tools.diagnostics.image.ImageSection
+     * 
+     */
+    List<ImageSection> getCompiledSections();
+    
+    
+    /**
+     * <p>
+     * An experimental addition to the API.
+     * <p>
+     * Get the set of {@link JavaVariable} objects
+     * <p>The returned list follows the standard semantics for javax.tools.diagnostics collections.</p>
+     * <p>The returned list is never null but could be empty.</p>
+     * 
+     * @return List of JavaVariable objects available
+     *  
+     */
+    List<JavaVariable> getVariables();  
+    
+	/**
+	 * @param obj
+	 * @return True if the given object refers to the same JavaMethod in the image
+	 */
+	public boolean equals(Object obj);
+	public int hashCode();
+}

Propchange: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native