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
//IValue value = jdivar.getValue();
ObjectReferenceImpl o = (ObjectReferenceImpl) value;
//if ( value instanceof JDINullValue ) {
// return null;
// }
//ObjectReference o = (ObjectReference) ((JDIObjectValue) value).getUnderlyingObject();
if ( o == null ) {
return null;
}
Field field = frameType.fieldByName( methodName );
Value val = o.getValue( field );
return val;
}