/** * @return a new breakpoint instance * * @since 0.17 */ public Breakpoint build() { if (sourceElements == null) { sourceElements = new SourceElement[]{SourceElement.STATEMENT}; } BreakpointLocation location; if (sourceSection != null) { location = new BreakpointLocation(key, sourceElements, sourceSection); } else { location = new BreakpointLocation(key, sourceElements, line, column); } Breakpoint breakpoint = new Breakpoint(location, anchor, oneShot, resolveListener); breakpoint.setIgnoreCount(ignoreCount); return breakpoint; }
/** * @return a new breakpoint instance of {@link Kind#SOURCE_LOCATION SOURCE_LOCATION} kind. * * @since 0.17 */ public Breakpoint build() { if (sourceElements == null) { sourceElements = new SourceElement[]{SourceElement.STATEMENT}; } BreakpointLocation location; if (sourceSection != null) { location = BreakpointLocation.create(key, sourceElements, sourceSection); } else { location = BreakpointLocation.create(key, sourceElements, line, column); } Breakpoint breakpoint = new Breakpoint(location, anchor, oneShot, null, resolveListener); breakpoint.setIgnoreCount(ignoreCount); return breakpoint; }
/** * @return a description of this breakpoint's specified location * * @since 0.9 */ public String getLocationDescription() { return locationKey.toString(); }
@Override public void onExecute(ExecuteSourceEvent event) { if (sourceResolved[0]) { return; } sourceResolved[0] = true; synchronized (Breakpoint.this) { if (sourceBinding != null) { sourceBinding.dispose(); } } Source source = event.getSource(); SourceSection location = locationKey.adjustLocation(source, debugger.getEnv(), suspendAnchor); if (location != null) { resolveBreakpoint(location); } SourceSectionFilter locationFilter = locationKey.createLocationFilter(source, suspendAnchor); breakpointBinding = createBinding(locationFilter); } }, true);
private void install() { assert Thread.holdsLock(this); SourceFilter filter; if (sourceBinding == null && (filter = locationKey.createSourceFilter()) != null) { final boolean[] sourceResolved = new boolean[]{false}; sourceBinding = debugger.getInstrumenter().attachExecuteSourceListener(filter, new ExecuteSourceListener() { SourceSectionFilter locationFilter = locationKey.createLocationFilter(null, suspendAnchor); breakpointBinding = createBinding(locationFilter);
f.sourceIs(source); } else { f.sourceFilter(createSourceFilter());
@Override public void onExecute(ExecuteSourceEvent event) { if (sourceResolved[0]) { return; } sourceResolved[0] = true; synchronized (Breakpoint.this) { if (sourceBinding != null) { sourceBinding.dispose(); } } Source source = event.getSource(); SourceSection location = locationKey.adjustLocation(source, debugger.getEnv(), suspendAnchor); if (location != null) { resolveBreakpoint(location); } SourceSectionFilter locationFilter = locationKey.createLocationFilter(source, suspendAnchor); breakpointBinding = debugger.getInstrumenter().attachExecutionEventFactory(locationFilter, new BreakpointNodeFactory()); } }, true);
private void install() { assert Thread.holdsLock(this); if (sourceBinding == null) { SourceFilter filter = locationKey.createSourceFilter(); final boolean[] sourceResolved = new boolean[]{false}; sourceBinding = debugger.getInstrumenter().attachExecuteSourceListener(filter, new ExecuteSourceListener() { SourceSectionFilter locationFilter = locationKey.createLocationFilter(null, suspendAnchor); breakpointBinding = debugger.getInstrumenter().attachExecutionEventFactory(locationFilter, new BreakpointNodeFactory());
/** * @return a new breakpoint instance of {@link Kind#EXCEPTION EXCEPTION} kind. * * @since 1.0 */ public Breakpoint build() { if (sourceElements == null) { sourceElements = new SourceElement[]{SourceElement.STATEMENT}; } BreakpointLocation location = BreakpointLocation.create(sourceElements, suspensionFilter); BreakpointExceptionFilter efilter = new BreakpointExceptionFilter(caught, uncaught); return new Breakpoint(location, SuspendAnchor.AFTER, false, efilter, null); } }