Package javax.tools.diagnostics.runtime.java

Examples of javax.tools.diagnostics.runtime.java.JavaRuntime


    }

  }

  public void testGetCompiledMethodsReturns() throws IOException {
    JavaRuntime runtime=getJavaRuntime();
    List i=runtime.getCompiledMethods();
    assertNotNull(i);

  }
View Full Code Here


    List i=runtime.getCompiledMethods();
    assertNotNull(i);

  }
  public void testGetCompiledMethodsIteratorIsEmpty() throws IOException {
    JavaRuntime runtime=getJavaRuntime();
    Iterator i=runtime.getCompiledMethods().iterator();
    assertFalse("compiled methods iterator is not empty",i.hasNext());

  }
View Full Code Here

    assertFalse("compiled methods iterator is not empty",i.hasNext());

  }

  public void testGetHeapIteratorReturns() throws IOException {
    JavaRuntime runtime=getPopulatedJavaRuntime();
    List i=runtime.getHeaps();
    assertNotNull(i);

  }
View Full Code Here

   * @return the JavaClassLoader object representing the system classloader.
   */
 
  protected JavaClassLoader getBootClassLoader() {
 
    JavaRuntime run = getJavaRuntime();
   
    // Find the bootstrap loader using the idea that it it the only loader to have loaded itself
    JavaClassLoader bootLoader = null;
    HashMap loaders = new HashMap();
    for (Iterator i = run.getJavaClassLoaders().iterator(); i.hasNext();) {
      Object next = i.next();
      if (next instanceof CorruptData) {
        continue;
      }
      JavaClassLoader jcl = (JavaClassLoader)next;
View Full Code Here

   *
   * @throws CorruptDataException
   */
  private JavaClassLoader getClassLoader2(JavaClass j1) throws CorruptDataException {   
    JavaClassLoader load = null;
    JavaRuntime run = getJavaRuntime();
    for (Iterator i = run.getJavaClassLoaders().iterator(); i.hasNext();) {
      Object next = i.next();
      if (next instanceof CorruptData) {
        continue;
      }
      JavaClassLoader jcl = (JavaClassLoader)next;
View Full Code Here

   
    return className.substring(cutoff+1);
  }
 
  public JavaObject getJavaObjectByClassname(String className) {
    JavaRuntime run = getJavaRuntime();
   
    for(Iterator heaps = run.getHeaps().iterator(); heaps.hasNext();) {
      Object nextHeap = heaps.next();
     
      if (nextHeap instanceof CorruptData) {
        continue;
      }
View Full Code Here

    assertNotNull(runtime.getFullVersion());

  }
  public void testGetVersion() throws IOException, CorruptDataException {

    JavaRuntime runtime=getJavaRuntime();
    assertNotNull(runtime.getVersion());

  }
View Full Code Here

  }


  public void testEqualsPasses() throws IOException {
    JavaRuntime runtime=getJavaRuntime();
    assertTrue(runtime.equals(runtime));

  }
View Full Code Here

    JavaRuntime runtime=getJavaRuntime();
    assertTrue(runtime.equals(runtime));

  }
  public void testEqualsFails() throws IOException {
    JavaRuntime runtime=getJavaRuntime();
    assertFalse(runtime.equals(new MockJavaRuntime()));

  }
View Full Code Here

  }

  public void testGetMonitors() throws IOException {

    JavaRuntime runtime=getJavaRuntime();
    List l=runtime.getMonitors();

    int count=l.size();
   
    assertEquals("More than 0 monitors returned. There are none.",0,count);
  }
View Full Code Here

TOP

Related Classes of javax.tools.diagnostics.runtime.java.JavaRuntime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.