|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JavaRuntime
Represents an instance of a Java Virtual Machine This interface defines attributes and features common across real implementation of the Java Virtual Machine. Not all of these characteristics are defined by the Java Virtual Machine Specification Notable additions beyond the JVM specification include Garbage Collection and access to the contents of the Heap or Heaps. Since this interface defines a view of the Java Runtime that is beyond that seen by the Java programmer during program execution it is necessarily more detailed.
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.util.List<JavaMethod> |
getCompiledMethods()
Get the set of JavaMethod objects that have been compiled. |
java.util.List<JavaReference> |
getHeapRoots()
Get the complete set of object and class roots known to the Java Virtual Machine |
java.util.List<JavaHeap> |
getHeaps()
Get the set of heaps known by the Java Virtual Machine There may be multiple heaps within a Java Virtual Machine, for instance a generational heap and a class heap. |
java.util.List<JavaClassLoader> |
getJavaClassLoaders()
Get the set of class loaders available in this Java Virtual Machine instance. |
ImagePointer |
getJavaVM()
Get the object that represents the virtual machine |
JavaVMInitArgs |
getJavaVMInitArgs()
Fetch the JavaVMInitArgs which were used to create this VM. |
java.util.List<JavaMonitor> |
getMonitors()
Provides access to the collection of monitors used in the Java Virtual Machine. |
JavaObject |
getObjectAtAddress(ImagePointer address)
Gets the object located at address address in the heap. |
java.io.File |
getSource()
Returns the File used as source for the creation of this Runtime. |
java.util.List<JavaThread> |
getThreads()
Get the set of Java Threads that have been started Thread.start() in this Java Virtual Machine instance. |
java.lang.Object |
getTraceBuffer(java.lang.String bufferName,
boolean formatted)
|
int |
hashCode()
|
Methods inherited from interface javax.tools.diagnostics.runtime.ManagedRuntime |
---|
getFullVersion, getVersion |
Method Detail |
---|
ImagePointer getJavaVM() throws CorruptDataException
CorruptDataException
JavaVMInitArgs getJavaVMInitArgs() throws DataUnavailable, CorruptDataException
JavaVMInitArgs
which were used to create this VM.
See JNI_CreateJavaVM in the JNI Specification for more details.
A valid object is returned or an exception is thrown.
DataUnavailable
- if the arguments are not available
CorruptDataException
- if the implementation was unexpectedly unable to retrieve the datajava.util.List<JavaClassLoader> getJavaClassLoaders()
Available in this context means class loaders that are participating in the class loader hierarchy. All class loaders are returned including any defined by the Java Virtual machine instance itself.
Any structural relationships between class loaders in this list is not exposed. Recreation of the class loader graph within a Java Virtual Machine instance is beyond the scope of the API.
At least one class loader must be returned in the resulting list.
The returned list follows the standard semantics for javax.tools.diagnostics collections
List
of all of the class loaders within this Java Virtual Machine instanceJavaClassLoader
java.util.List<JavaThread> getThreads()
Thread.start()
in this Java Virtual Machine instance.
This method does not return all instances of java.lang.Thread contained within the system. Only threads that have been started and have
not yet stopped or exited are returned. Threads may not be in an active state when returned by this method.
The returned list follows the standard semantics for javax.tools.diagnostics collections
The returned list is never null although it can be empty.
List
of the JavaThreads in the runtimeJavaThread
java.util.List<JavaMethod> getCompiledMethods()
JavaMethod.getCompiledSections()
must be contained within the list
returned by this method.
The returned list follows the standard semantics for javax.tools.diagnostics collections
List
of all of the JavaMethods in the JavaRuntime which
have been compiled.JavaMethod
java.util.List<JavaMonitor> getMonitors()
JavaMonitor
,
CorruptData
java.util.List<JavaHeap> getHeaps()
The returned list follows the standard semantics for javax.tools.diagnostics collections.
The returned list is never null and will always contain at least one JavaHeap object
JavaHeap
,
CorruptData
java.util.List<JavaReference> getHeapRoots()
JavaReference
,
JavaStackFrame
,
CorruptData
java.lang.Object getTraceBuffer(java.lang.String bufferName, boolean formatted) throws CorruptDataException
bufferName
- a String naming the buffer to be fetchedformatted
- true if formatting should be performed on the buffer, or
false if the raw buffer contents should be returned
CorruptDataException
JavaObject getObjectAtAddress(ImagePointer address) throws CorruptDataException, java.lang.IllegalArgumentException, MemoryAccessException, DataUnavailable
address
in the heap.
addr
- the ImagePointer
instance representing the start address of object in the heap;
JavaObject
instance representing the located object.
java.lang.IllegalArgumentException
- if address
is null, outside the heap's boundaries or if it doesn't point to the start location of an object;
MemoryAccessException
- if address
is is in the heap but it's not accessible from the dump;
CorruptDataException
- if any data needed to build the returned instance of JavaObject
is corrupt.
DataUnavailable
- if any data needed to build the returned instance of JavaObject
is not available.JavaObject
boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
-
int hashCode()
hashCode
in class java.lang.Object
java.io.File getSource()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |