Package javax.tools.diagnostics.runtime.java

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


      // expected
   
  }
 
  public void testLongValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField longValueField = getJavaField(thisJavaObject, "longValue");

    try{
      short aLongValue = longValueField.getShort(thisJavaObject);
      fail("Missing illegal argument exception from JavaField.getShort(longValue)");
View Full Code Here


      // expected
   
  }
 
  public void testIntValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField intValueField = getJavaField(thisJavaObject, "intValue");

    try{
      short aIntValue = intValueField.getShort(thisJavaObject);
      fail("Missing illegal argument exception from JavaField.getShort(intValue)");
View Full Code Here

      // expected
   
  }
 
  public void testByteValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField byteValueField = getJavaField(thisJavaObject, "byteValue");

    try{
      short aByteValue = byteValueField.getShort(thisJavaObject);
    } catch (IllegalArgumentException e) {
View Full Code Here

      fail("Unexpected illegal argument exception from JavaField.getShort(byteValue)");
   
  }
 
  public void testCharValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField charValueField = getJavaField(thisJavaObject, "charValue");

    try{
      short aShortValue = charValueField.getShort(thisJavaObject);
      fail("Missing illegal argument exception from JavaField.getShort(charValue)");
View Full Code Here

      // expected
   
  }
 
  public void testBooleanValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField booleanValueField = getJavaField(thisJavaObject, "booleanValue");
   
    try{
      short aBooleanValue = booleanValueField.getShort(thisJavaObject);
      fail("Missing illegal argument exception from JavaField.getShort(booleanValue)");
View Full Code Here

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

public class TestJavaObject_getReferences extends TCKJavaRuntimeTestcase {

  public void testMultiDimensionalArrayReferences() {
    try {
      JavaObject thisObject = getScenerioReference();
      JavaField multiDimArrayField = getJavaField(thisObject, "multiDimArray");
      Object multiDimArrayObject = multiDimArrayField.get(thisObject);
      if (multiDimArrayObject instanceof JavaObject) {
        JavaObject mdObject = (JavaObject)multiDimArrayObject;
        Iterator refs = mdObject.getReferences().iterator();
        while (refs.hasNext()) {
          Object next = refs.next();
          if (next instanceof JavaReference) {
            JavaReference ref = (JavaReference) next;
            try {
              Object target = ref.getTarget();
              if (target instanceof JavaObject) {
                JavaObject targetObject = (JavaObject) target;
                System.out.println(targetObject.getJavaClass().getName());
              }
              System.out.println(ref.getDescription());
            } catch (DataUnavailable e) {
              e.printStackTrace();
            }
View Full Code Here

   
    return thisObject;   
  }
 
  public void testMaxLongValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField maxLongField = getJavaField(thisJavaObject, "maxLong");
   
    long maxLongValue = maxLongField.getLong(thisJavaObject);
   
    assertEquals(setup.maxLong, maxLongValue);   
View Full Code Here

   
    assertEquals(setup.maxLong, maxLongValue);   
  }
 
  public void testMinLongValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField minLongField = getJavaField(thisJavaObject, "minLong");
   
    long minLongValue = minLongField.getLong(thisJavaObject);
   
    assertEquals(setup.minLong, minLongValue);   
View Full Code Here

   
    assertEquals(setup.minLong, minLongValue);   
  }

  public void testStaticMinLongValue() throws Exception {
    JavaObject thisJavaObject = getScenerioReference();
    JavaField minLongField = getJavaField(thisJavaObject, "staticMinLong");
   
    long minLongValue = minLongField.getLong(null);
   
    assertEquals(SetupJavaField_getLong.staticMinLong, minLongValue);   
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.