Package com.sun.jdi

Examples of com.sun.jdi.LocalVariable


        //frame arg
        Method method = getUnderlyingMethod(); // onBreak
        //ReferenceType declaringType = method.declaringType(); // org.drools.core.base.mvel.MVELDebugHandler

        LocalVariable var = (LocalVariable) method.variables().get( 0 );//frame

        ClassType frameType = (ClassType) var.type();

        StackFrame frame = getUnderlyingStackFrame();
        Value value = frame.getValue( var );
        //getThread().getTopStackFrame().get
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);
              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

          JDIMessages.StackFrameImpl_no_argument_values_available);
    }
    try {
      List<LocalVariable> list = location().method().variables();
      ArrayList<Value> ret = new ArrayList<Value>();
      LocalVariable var = null;
      for (Iterator<LocalVariable> iter = list.iterator(); iter.hasNext();) {
        var = iter.next();
        if (var.isArgument()) {
          ret.add(getValue(var));
        }
      }
      return ret;
    } catch (AbsentInformationException e) {
View Full Code Here

    }

    List<LocalVariable> result = new ArrayList<LocalVariable>();
    Iterator<LocalVariable> iter = variables().iterator();
    while (iter.hasNext()) {
      LocalVariable var = iter.next();
      if (var.isArgument())
        result.add(var);
    }
    fArguments = result;
    return fArguments;
  }
View Full Code Here

   */
  public List<LocalVariable> variablesByName(String name) throws AbsentInformationException {
    Iterator<LocalVariable> iter = variables().iterator();
    List<LocalVariable> result = new ArrayList<LocalVariable>();
    while (iter.hasNext()) {
      LocalVariable var = iter.next();
      if (var.name().equals(name)) {
        result.add(var);
      }
    }
    return result;
  }
View Full Code Here

        }
        // add locals
        Iterator<LocalVariable> variables = getUnderlyingVisibleVariables()
            .iterator();
        while (variables.hasNext()) {
          LocalVariable var = variables.next();
          fVariables.add(new JDILocalVariable(this, var));
        }
      } else if (fRefreshVariables) {
        updateVariables();
      }
View Full Code Here

    @Override
    Value get( String name )
    {
        try
        {
            LocalVariable local = frame.visibleVariableByName( name );
            if ( local == null )
            {
                throw new IllegalArgumentException( String.format( "'%s' is not visible in this scope.", name ) );
            }
            return frame.getValue( local );
View Full Code Here

TOP

Related Classes of com.sun.jdi.LocalVariable

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.