Package com.sun.jdi

Examples of com.sun.jdi.Location.method()


    public final static synchronized DroolsStackFrame createCustomFrame(DroolsThread thread,
                                                                        int depth,
                                                                        StackFrame currentFrame) {
        DroolsStackFrame customFrame;
        Location loc = currentFrame.location();
        if ( loc.declaringType().name().equals( "org.drools.core.base.mvel.MVELDebugHandler" ) && loc.method().name().equals( "onBreak" ) ) {
            customFrame = new MVELStackFrame( thread,
                                              currentFrame,
                                              depth );
        } else {
            customFrame = new DroolsStackFrame( thread,
View Full Code Here


      List<StackFrame> frames = threadRef.frames();
      for (int i=0; i<frames.size(); i++) {
        StackFrame frame = frames.get(i);
        Location loc = frame.location();
        String name = loc.declaringType().name() + "."
            + loc.method().name();
        String frameInfo = name + " line: " + loc.lineNumber();
        if (i == threadStack.getCurFrame()) {
          frameInfo = frameInfo + "  (current frame) ";
        }
        result.add(frameInfo);
View Full Code Here

    public final static synchronized DroolsStackFrame createCustomFrame(DroolsThread thread,
                                                                        int depth,
                                                                        StackFrame currentFrame) {
        DroolsStackFrame customFrame;
        Location loc = currentFrame.location();
        if ( loc.declaringType().name().equals( "org.drools.base.mvel.MVELDebugHandler" ) && loc.method().name().equals( "onBreak" ) ) {
            customFrame = new MVELStackFrame( thread,
                                              currentFrame,
                                              depth );
        } else {
            customFrame = new DroolsStackFrame( thread,
View Full Code Here

    public final static synchronized DroolsStackFrame createCustomFrame(DroolsThread thread,
                                                                        int depth,
                                                                        StackFrame currentFrame) {
        DroolsStackFrame customFrame;
        Location loc = currentFrame.location();
        if ( loc.declaringType().name().equals( "org.drools.core.base.mvel.MVELDebugHandler" ) && loc.method().name().equals( "onBreak" ) ) {
            customFrame = new MVELStackFrame( thread,
                                              currentFrame,
                                              depth );
        } else {
            customFrame = new DroolsStackFrame( thread,
View Full Code Here

          if (!done && e instanceof BreakpointEvent) {
            final BreakpointEvent be = (BreakpointEvent) e;
            final Location loc = be.location();
            final ThreadReference tr = be.thread()
            if (loc.equals(interceptIn)) {
              LocalVariable result = (LocalVariable) loc.method().variablesByName("result").get(0);
              LocalVariable buffer = (LocalVariable) loc.method().arguments().get(0);
              ArrayReference buf = (ArrayReference) tr.frame(0).getValue(buffer);
              new InputInterceptHandler(tr, buf, result).start();
            } else if (loc.equals(interceptOut)) {
              LocalVariable result = (LocalVariable) loc.method().variablesByName("result").get(0);
View Full Code Here

            final BreakpointEvent be = (BreakpointEvent) e;
            final Location loc = be.location();
            final ThreadReference tr = be.thread()
            if (loc.equals(interceptIn)) {
              LocalVariable result = (LocalVariable) loc.method().variablesByName("result").get(0);
              LocalVariable buffer = (LocalVariable) loc.method().arguments().get(0);
              ArrayReference buf = (ArrayReference) tr.frame(0).getValue(buffer);
              new InputInterceptHandler(tr, buf, result).start();
            } else if (loc.equals(interceptOut)) {
              LocalVariable result = (LocalVariable) loc.method().variablesByName("result").get(0);
              LocalVariable data = (LocalVariable) loc.method().arguments().get(0);
View Full Code Here

              LocalVariable result = (LocalVariable) loc.method().variablesByName("result").get(0);
              LocalVariable buffer = (LocalVariable) loc.method().arguments().get(0);
              ArrayReference buf = (ArrayReference) tr.frame(0).getValue(buffer);
              new InputInterceptHandler(tr, buf, result).start();
            } else if (loc.equals(interceptOut)) {
              LocalVariable result = (LocalVariable) loc.method().variablesByName("result").get(0);
              LocalVariable data = (LocalVariable) loc.method().arguments().get(0);
              ArrayReference buf = (ArrayReference) tr.frame(0).getValue(data);
              List values = buf.getValues();
              byte[] temp = new byte[buf.length()];
              for (int i = 0; i < temp.length; i++) {
View Full Code Here

              LocalVariable buffer = (LocalVariable) loc.method().arguments().get(0);
              ArrayReference buf = (ArrayReference) tr.frame(0).getValue(buffer);
              new InputInterceptHandler(tr, buf, result).start();
            } else if (loc.equals(interceptOut)) {
              LocalVariable result = (LocalVariable) loc.method().variablesByName("result").get(0);
              LocalVariable data = (LocalVariable) loc.method().arguments().get(0);
              ArrayReference buf = (ArrayReference) tr.frame(0).getValue(data);
              List values = buf.getValues();
              byte[] temp = new byte[buf.length()];
              for (int i = 0; i < temp.length; i++) {
                temp[i] = ((ByteValue)values.get(i)).byteValue();
View Full Code Here

    // method, since this checks the code index within the method. Even if
    // the
    // code indices are different, the line numbers may be the same, in
    // which case
    // we need to do the extra step into.
    Method origMethod = origLocation.method();
    Method currMethod = location.method();
    if (!origMethod.equals(currMethod)) {
      return false;
    }
    if (origLocation.lineNumber() != location.lineNumber()) {
View Full Code Here

    protected boolean locationShouldBeFiltered(Location location)
        throws DebugException {
      if (applyStepFilters()) {
        Location origLocation = getOriginalStepLocation();
        if (origLocation != null) {
          return !locationIsFiltered(origLocation.method())
              && locationIsFiltered(location.method());
        }
      }
      return false;
    }
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.