DebuggerSession(Debugger debugger, SuspendedCallback callback, SourceElement... sourceElements) { this.sessionId = SESSIONS.incrementAndGet(); this.debugger = debugger; this.callback = callback; switch (sourceElements.length) { case 0: this.sourceElements = Collections.emptySet(); break; case 1: this.sourceElements = Collections.singleton(sourceElements[0]); break; default: this.sourceElements = Collections.unmodifiableSet(new LinkedHashSet<>(Arrays.asList(sourceElements))); break; } this.hasExpressionElement = this.sourceElements.contains(SourceElement.EXPRESSION); if (Debugger.TRACE) { trace("open with callback %s", callback); } addBindings(includeInternal, sourceFilter); executionLifecycle = new DebuggerExecutionLifecycle(debugger); }
DebuggerSession(Debugger debugger, SuspendedCallback callback, SourceElement... sourceElements) { this.sessionId = SESSIONS.incrementAndGet(); this.debugger = debugger; this.callback = callback; switch (sourceElements.length) { case 0: this.sourceElements = Collections.emptySet(); break; case 1: this.sourceElements = Collections.singleton(sourceElements[0]); break; default: this.sourceElements = Collections.unmodifiableSet(new LinkedHashSet<>(Arrays.asList(sourceElements))); break; } this.hasExpressionElement = this.sourceElements.contains(SourceElement.EXPRESSION); this.hasRootElement = this.sourceElements.contains(SourceElement.ROOT); if (Debugger.TRACE) { trace("open with callback %s", callback); } sources = new DebugSourcesResolver(); addBindings(includeInternal, sourceFilter); executionLifecycle = new DebuggerExecutionLifecycle(this); }
/** * Set a stepping suspension filter. Prepared steps skip code that match this filter. * * @since 0.26 */ public void setSteppingFilter(SuspensionFilter steppingFilter) { this.ignoreLanguageContextInitialization.set(steppingFilter.isIgnoreLanguageContextInitialization()); synchronized (this) { boolean oldIncludeInternal = this.includeInternal; this.includeInternal = steppingFilter.isInternalIncluded(); Predicate<Source> oldSourceFilter = this.sourceFilter; this.sourceFilter = steppingFilter.getSourcePredicate(); if (oldIncludeInternal != this.includeInternal || oldSourceFilter != this.sourceFilter) { removeBindings(); addBindings(this.includeInternal, this.sourceFilter); } } }
/** * Set a stepping suspension filter. Prepared steps skip code that does not match this filter. * * @since 0.26 */ public void setSteppingFilter(SuspensionFilter steppingFilter) { this.ignoreLanguageContextInitialization.set(steppingFilter.isIgnoreLanguageContextInitialization()); synchronized (this) { boolean oldIncludeInternal = this.includeInternal; this.includeInternal = steppingFilter.isInternalIncluded(); Predicate<Source> oldSourceFilter = this.sourceFilter; this.sourceFilter = steppingFilter.getSourcePredicate(); if (oldIncludeInternal != this.includeInternal || oldSourceFilter != this.sourceFilter) { removeBindings(); addBindings(this.includeInternal, this.sourceFilter); } } }