Examples of referenceType()


Examples of com.sun.jdi.ObjectReference.referenceType()

        }
        // handle objects
        if (getType() == TYPE_OBJECT) { // this also rules out null
            // check if this object has any fields
            ObjectReference obj = (ObjectReference) value;
            return !obj.referenceType().visibleFields().isEmpty();
        }

        return false;
    }
View Full Code Here

Examples of com.sun.jdi.ObjectReference.referenceType()

        if ( value instanceof ObjectReference )
        {
            ObjectReference reference = (ObjectReference) value;
            if ( boxedType.getName().equals( reference.type().name() ) )
            {
                for ( Field field : reference.referenceType().fields() )
                {
                    try
                    {
                        if ( field.isStatic() && field.type() instanceof PrimitiveType )
                        {
View Full Code Here

Examples of com.sun.jdi.event.ClassPrepareEvent.referenceType()

              });
            } else if (event instanceof ClassPrepareEvent) {
              ClassPrepareEvent cpe = (ClassPrepareEvent) event;
              // set breakpoints
              for (Breakpoint bp : EditorFacade.getInstance().getBreakpoints()) {
                if (bp.getClassName().equals(cpe.referenceType().name())) {
                  List<Method> mlist = cpe.referenceType().methodsByName(bp.getMethodName(), bp.getMethodDesc().getRawDesc());
                  if (mlist.size() > 0) {
                    Location loc = mlist.get(0).locationOfCodeIndex(bp.getPc());
                    BreakpointRequest bpr = vm.eventRequestManager().createBreakpointRequest(loc);
                    bpr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
View Full Code Here

Examples of com.sun.jdi.event.ClassPrepareEvent.referenceType()

            } else if (event instanceof ClassPrepareEvent) {
              ClassPrepareEvent cpe = (ClassPrepareEvent) event;
              // set breakpoints
              for (Breakpoint bp : EditorFacade.getInstance().getBreakpoints()) {
                if (bp.getClassName().equals(cpe.referenceType().name())) {
                  List<Method> mlist = cpe.referenceType().methodsByName(bp.getMethodName(), bp.getMethodDesc().getRawDesc());
                  if (mlist.size() > 0) {
                    Location loc = mlist.get(0).locationOfCodeIndex(bp.getPc());
                    BreakpointRequest bpr = vm.eventRequestManager().createBreakpointRequest(loc);
                    bpr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
                    bpr.setEnabled(true);
View Full Code Here

Examples of com.sun.jdi.event.ClassPrepareEvent.referenceType()

            }
           
            else if(event instanceof ClassPrepareEvent)
              {
              ClassPrepareEvent cpe=(ClassPrepareEvent) event;
                  ReferenceType rt = cpe.referenceType();
                 
                  //inspeccionar metodos
                  if(traceFilter.isTraceMethods())
                    {
                    for(Method method : rt.methods())
View Full Code Here

Examples of com.sun.jdi.event.ClassPrepareEvent.referenceType()

                           
              //deshabilitar evento
              /*event.request().disable();
                  vm.eventRequestManager().deleteEventRequest(event.request());
                  */
                  ReferenceType rt = cpe.referenceType();
                 
                  //inspeccion method entry y method exit
                  //primero se ejecuta el breakpoint
                  if(traceFilter.isTraceMethods())
                    {
View Full Code Here

Examples of com.sun.jdi.event.ClassPrepareEvent.referenceType()

    eventSet.resume();
  }
 
  private void handleClassPrepareEvent(ClassPrepareEvent event) {
    ClassPrepareEvent classPrepareEvent = (ClassPrepareEvent) event;
    String mainClassName = classPrepareEvent.referenceType().name();
    BreakpointManager bpm = BreakpointManager.getInstance();
    bpm.tryCreateBreakpointRequest(mainClassName);
   
    event.thread().resume();
  }
View Full Code Here

Examples of com.sun.jdi.event.ClassPrepareEvent.referenceType()

                //int resumeVMtimes = 0;
                for(EventIterator i = eventSet.eventIterator(); i.hasNext(); ) {
                    Event evt = i.nextEvent();
                    if(evt instanceof ClassPrepareEvent) {
                        ClassPrepareEvent cpe = (ClassPrepareEvent) evt;
                        ReferenceType refType = cpe.referenceType();
                        logClazz.debug("Loading: " + refType.name() + " [cl:" + refType.classLoader()+"]");
                        loadClassDebug(refType, cpe.thread());
                    } else if(evt instanceof ClassUnloadEvent) {
                      ClassUnloadEvent cue = (ClassUnloadEvent) evt;
                      logClazz.debug("Unloading: " + cue.className());
View Full Code Here

Examples of com.sun.jdi.event.ClassPrepareEvent.referenceType()

          connected = false;
        } else if (event instanceof ClassPrepareEvent) {
          // watch field on loaded class
          System.out.println("ClassPrepareEvent");
          ClassPrepareEvent classPrepEvent = (ClassPrepareEvent) event;
          ReferenceType refType = classPrepEvent
              .referenceType();
          addFieldWatch(vm, refType);
        } else if (event instanceof ModificationWatchpointEvent) {
          System.out.println("sleep for 500 ms");
          Thread.sleep(500);
View Full Code Here

Examples of com.sun.jdi.event.ClassPrepareEvent.referenceType()

                else if ( event instanceof ClassPrepareEvent )
                {
                    ClassPrepareEvent prepareEvent = (ClassPrepareEvent) event;
                    handler.onClassPrepare( suspension, prepareEvent.virtualMachine(), prepareEvent.thread(),
                                            (ClassPrepareRequest) prepareEvent.request(),
                                            prepareEvent.referenceType() );
                }
                else if ( event instanceof ClassUnloadEvent )
                {
                    ClassUnloadEvent unloadEvent = (ClassUnloadEvent) event;
                    handler.onClassUnload( suspension, unloadEvent.virtualMachine(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.