Package gnu.classpath.jdwp.id

Examples of gnu.classpath.jdwp.id.ReferenceTypeId


  }

  private void executeNestedTypes(ByteBuffer bb, DataOutputStream os)
    throws JdwpException, IOException
  {
    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
    Class clazz = refId.getType();
    Class[] declaredClazzes = clazz.getDeclaredClasses();
    os.writeInt(declaredClazzes.length);
    for (int i = 0; i < declaredClazzes.length; i++)
      {
        Class decClazz = declaredClazzes[i];
        ReferenceTypeId clazzId = idMan.getReferenceTypeId(decClazz);
        clazzId.writeTagged(os);
      }
  }
View Full Code Here


  }

  private void executeStatus(ByteBuffer bb, DataOutputStream os)
    throws JdwpException, IOException
  {
    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
    Class clazz = refId.getType();

    // I don't think there's any other way to get this
    int status = VMVirtualMachine.getClassStatus(clazz);
    os.writeInt(status);
  }
View Full Code Here

  }

  private void executeInterfaces(ByteBuffer bb, DataOutputStream os)
    throws JdwpException, IOException
  {
    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
    Class clazz = refId.getType();
    Class[] interfaces = clazz.getInterfaces();
    os.writeInt(interfaces.length);
    for (int i = 0; i < interfaces.length; i++)
      {
        Class interfaceClass = interfaces[i];
        ReferenceTypeId intId = idMan.getReferenceTypeId(interfaceClass);
        intId.write(os);
      }
  }
View Full Code Here

  }

  private void executeClassObject(ByteBuffer bb, DataOutputStream os)
    throws JdwpException, IOException
  {
    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
    Class clazz = refId.getType();
    ObjectId clazzObjectId = idMan.getObjectId(clazz);
    clazzObjectId.write(os);
  }
View Full Code Here

    throws JdwpException, IOException
  {
    ObjectId oid = idMan.readObjectId(bb);
    Object obj = oid.getObject();
    Class clazz = obj.getClass();
    ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
    refId.writeTagged(os);
  }
View Full Code Here

    Object obj = oid.getObject();

    ObjectId tid = idMan.readObjectId(bb);
    Thread thread = (Thread) tid.getObject();

    ReferenceTypeId rid = idMan.readReferenceTypeId(bb);
    Class clazz = rid.getType();

    ObjectId mid = idMan.readObjectId(bb);
    Method method = (Method) mid.getObject();

    int args = bb.getInt();
View Full Code Here

    os.writeInt(allMatchingClasses.size());
    for (int i = 0; i < allMatchingClasses.size(); i++)
      {
        Class clazz = (Class) allMatchingClasses.get(i);
        ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
        id.writeTagged(os);
        int status = VMVirtualMachine.getClassStatus(clazz);
        os.writeInt(status);
      }
  }
View Full Code Here

    // Note it's possible classes were created since out classCount so make
    // sure we don't write more classes than we told the debugger
    while (iter.hasNext() && count++ < classCount)
      {
        Class clazz = (Class) iter.next();
        ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
        id.writeTagged(os);
        String sig = Signature.computeClassSignature(clazz);
        JdwpString.writeString(os, sig);
        int status = VMVirtualMachine.getClassStatus(clazz);
        os.writeInt(status);
      }
View Full Code Here

      //todo improve it:
      //1. read in the classes and validate them
      //2. perform only hotswapping if all is fine
      int class_count = bb.getInt();
      for(int i = 0; i < class_count; i++){
          ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
          Class old_class = refId.getType();
          int class_size = bb.getInt();
          byte[] class_data = new byte[class_size];
          bb.get(class_data);
          System.out.println("Hotswapping " + old_class.getName());
          VMVirtualMachine.redefineClass(old_class, class_data);
View Full Code Here

    ObjectId oid = idMan.readObjectId(bb);
    Class clazz = (Class) oid.getObject();

    // The difference between a ClassObjectId and a ReferenceTypeId is one is
    // stored as an ObjectId and the other as a ReferenceTypeId.
    ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
    refId.writeTagged(os);
  }
View Full Code Here

TOP

Related Classes of gnu.classpath.jdwp.id.ReferenceTypeId

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.