Package javax.tools.diagnostics.runtime.java

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


      fail("Unexpected illegal argument exception from JavaField.getInt(shortValue)");
   
  }
 
  public void testBooleanValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField booleanValueField = getJavaField(thisJavaObject, "booleanValue");
   
    try{
      int aBooleanValue = booleanValueField.getInt(thisJavaObject);
      fail("Missing illegal argument exception from JavaField.getInteger(booleanValue)");
View Full Code Here


      // expected
    }
  }
 
  public void testObjectReference() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField objectReferenceField = getJavaField(thisJavaObject, "objectReference");
   
    try{
      int anObjectReference = objectReferenceField.getInt(thisJavaObject);
      fail("Missing illegal argument exception from JavaField.getInteger(objectReference)");
View Full Code Here

        if (nextObject instanceof CorruptData) {
          System.err.println("returned CorruptData `" + nextObject + "'");
          break;
        }

        JavaObject aJavaObject = (JavaObject) nextObject;
        try {
          JavaClass theJavaClass = aJavaObject.getJavaClass();
          String theClassName = (theJavaClass).getName();
          if (SetupJavaClass_getName.TestObjectClassName.equals(theClassName)) {
            System.out.println("theClassName "+theClassName);
            foundClassName=true;
          }
View Full Code Here

    }
    assertTrue(foundClassName);
  }
 
  public void testUnicodeClassName() throws Exception {
    JavaObject obj = getJavaObjectByClassname(SetupJavaClass_getName.unicodeClassname);
   
    assertNotNull("Couldn't find object of instance " + SetupJavaClass_getName.unicodeClassname, obj);
  }
View Full Code Here

   
    return thisObject;   
  }
 
  public void testIncompatibleClass() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField trueBooleanField = getJavaField(thisJavaObject, "trueBoolean");
    JavaObject incompatibleClass = getJavaObjectByClassname(setup.incompatibleClassName);
   
    assertNotNull("Couldn't find "+setup.incompatibleClassName,incompatibleClass);
    try{
      boolean trueBooleanValue = trueBooleanField.getBoolean(incompatibleClass);
      fail("JavaField.getBoolean() didn't fail when passed Object of wrong class");
View Full Code Here

    }
  }
 
 
  public void testNullObjectInstanceField() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField trueBooleanField = getJavaField(thisJavaObject, "trueBoolean");
   
    try{
      boolean trueBooleanValue = trueBooleanField.getBoolean(null);
      fail("JavaField.getBoolean(null) on instance field didn't throw null pointer exception.");
View Full Code Here

    }
       
  }

  public void testNonNullObjectInstanceStaticField() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField trueBooleanField = getJavaField(thisJavaObject, "trueStaticBoolean");
   
    boolean trueBooleanValue = trueBooleanField.getBoolean(thisJavaObject);
   
    assertEquals(SetupJavaField_getBoolean.trueStaticBoolean, trueBooleanValue);   
View Full Code Here

    assertEquals(SetupJavaField_getBoolean.trueStaticBoolean, trueBooleanValue);   
  }
 
 
  public void testTrueBoolean() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField trueBooleanField = getJavaField(thisJavaObject, "trueBoolean");
   
    boolean trueBooleanValue = trueBooleanField.getBoolean(thisJavaObject);
   
    assertEquals(setup.trueBoolean, trueBooleanValue);   
View Full Code Here

   
    assertEquals(setup.trueBoolean, trueBooleanValue);   
  }
 
  public void testFalseBoolean() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField falseBooleanField = getJavaField(thisJavaObject, "falseBoolean");
   
    boolean falseBooleanValue = falseBooleanField.getBoolean(thisJavaObject);
   
    assertEquals(SetupJavaField_getBoolean.falseStaticBoolean, falseBooleanValue);   
View Full Code Here

   
    assertEquals(SetupJavaField_getBoolean.falseStaticBoolean, falseBooleanValue);   
  }
 
  public void testTrueStaticBoolean() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField trueBooleanField = getJavaField(thisJavaObject, "trueStaticBoolean");
   
    boolean trueBooleanValue = trueBooleanField.getBoolean(null);
   
    assertEquals(SetupJavaField_getBoolean.trueStaticBoolean, trueBooleanValue);   
View Full Code Here

TOP

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

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.