Package javax.tools.diagnostics.runtime.java

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


          if (next2 instanceof CorruptData) {
            continue;
          }

          JavaField field = (JavaField) next2;
          String id = null;

          if ("id".equals(field.getName())) {
            id = field.getString(monitorObjectCandidate);
          }

          if (id != null) {

            MonitorThreadConfig config = setup.findMonitorThreadConfig(id);
View Full Code Here


      JavaMonitor monitor=(JavaMonitor) setup.monitorConfigs[i].monitor;
      JavaObject object = monitor.getObject();
     
      assertEquals("Monitor object class unexpected name.",setup.monitorClassName, object.getJavaClass().getName());
     
      JavaField idField = getJavaField(object, "id");
      String idString = idField.getString(object);
     
      assertEquals("MonitorClass id strings didn't match.", setup.monitorConfigs[i].id, idString);
    }
  }
View Full Code Here

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

          JavaField theField = (JavaField) nextField;
          String theFieldName = theField.getName();
          if (theFieldName.equals("JavaClassLoader_getJavaObject")){
            foundClassLoader = true;
          }

        }
View Full Code Here

    return thisObject;   
  }
 
  public void testMaxIntegerValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField maxIntegerField = getJavaField(thisJavaObject, "maxInteger");
   
    int maxIntegerValue = maxIntegerField.getInt(thisJavaObject);
   
    assertEquals(setup.maxInteger, maxIntegerValue);   
  }
View Full Code Here

    assertEquals(setup.maxInteger, maxIntegerValue);   
  }
 
  public void testMinIntegerValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField minIntegerField = getJavaField(thisJavaObject, "minInteger");
   
    int minIntegerValue = minIntegerField.getInt(thisJavaObject);
   
    assertEquals(setup.minInteger, minIntegerValue);   
  }
View Full Code Here

    assertEquals(setup.minInteger, minIntegerValue);   
  }

  public void testStaticMinIntegerValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField minIntegerField = getJavaField(thisJavaObject, "staticMinInteger");
   
    int minIntegerValue = minIntegerField.getInt(null);
   
    assertEquals(SetupJavaField_getInt.staticMinInteger, minIntegerValue);   
  }
View Full Code Here

    assertEquals(SetupJavaField_getInt.staticMinInteger, minIntegerValue);   
  }
 
  public void testZeroIntegerValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField zeroIntegerField = getJavaField(thisJavaObject, "zeroInteger");
   
    int zeroIntegerValue = zeroIntegerField.getInt(thisJavaObject);
   
    assertEquals(setup.zeroInteger, zeroIntegerValue);   
  }
View Full Code Here

    assertEquals(setup.zeroInteger, zeroIntegerValue);   
  }
 
  public void testNegIntegerValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField negIntegerField = getJavaField(thisJavaObject, "negInteger");
   
    int negIntegerValue = negIntegerField.getInt(thisJavaObject);
   
    assertEquals(setup.negInteger, negIntegerValue);   
 
View Full Code Here

    assertEquals(setup.negInteger, negIntegerValue);   
 
 
  public void testPosIntegerValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField posIntegerField = getJavaField(thisJavaObject, "posInteger");
   
    int posIntegerValue = posIntegerField.getInt(thisJavaObject);
   
    assertEquals(setup.posInteger, posIntegerValue);   
  }
View Full Code Here

  }


  public void testDoubleValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField doubleValueField = getJavaField(thisJavaObject, "doubleValue");

    try{
      int aDoubleValue = doubleValueField.getInt(thisJavaObject);
      fail("Missing illegal argument exception from JavaField.getInt(doubleValue)");
    } catch (IllegalArgumentException e) {
      // expected
   
  }
View Full Code Here

TOP

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

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.