本文整理汇总了Java中com.sun.jdi.request.StepRequest.addClassExclusionFilter方法的典型用法代码示例。如果您正苦于以下问题:Java StepRequest.addClassExclusionFilter方法的具体用法?Java StepRequest.addClassExclusionFilter怎么用?Java StepRequest.addClassExclusionFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jdi.request.StepRequest
的用法示例。
在下文中一共展示了StepRequest.addClassExclusionFilter方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createStepRequest
import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
private static StepRequest createStepRequest(ThreadReference thread, int stepSize, int stepDepth, String[] stepFilters) {
StepRequest request = thread.virtualMachine().eventRequestManager().createStepRequest(thread, stepSize, stepDepth);
if (stepFilters != null) {
for (String stepFilter : stepFilters) {
request.addClassExclusionFilter(stepFilter);
}
}
request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
request.addCountFilter(1);
return request;
}
示例2: doStep
import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
private StepEvent doStep(ThreadReference thread, int gran, int depth) {
final StepRequest sr =
eventRequestManager().createStepRequest(thread, gran, depth);
sr.addClassExclusionFilter("java.*");
sr.addClassExclusionFilter("sun.*");
sr.addClassExclusionFilter("com.sun.*");
sr.addCountFilter(1);
sr.enable();
StepEvent retEvent = (StepEvent)resumeToEvent(sr);
eventRequestManager().deleteEventRequest(sr);
return retEvent;
}
示例3: addExcludes
import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
static void addExcludes(StepRequest request) {
for (String pattern : excludes()) {
request.addClassExclusionFilter(pattern);
}
}
示例4: doStep
import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
/**
*
* @param suspendContext
* @param stepThread
* @param size the step size. One of {@link StepRequest#STEP_LINE} or {@link StepRequest#STEP_MIN}
* @param depth
* @param hint may be null
*/
protected void doStep(final SuspendContextImpl suspendContext, final ThreadReferenceProxyImpl stepThread, int size, int depth,
RequestHint hint) {
if (stepThread == null) {
return;
}
try {
final ThreadReference stepThreadReference = stepThread.getThreadReference();
if (LOG.isDebugEnabled()) {
LOG.debug("DO_STEP: creating step request for " + stepThreadReference);
}
deleteStepRequests(stepThreadReference);
EventRequestManager requestManager = getVirtualMachineProxy().eventRequestManager();
StepRequest stepRequest = requestManager.createStepRequest(stepThreadReference, size, depth);
if (!(hint != null && hint.isIgnoreFilters()) /*&& depth == StepRequest.STEP_INTO*/) {
List<ClassFilter> activeFilters = getActiveFilters();
if (!activeFilters.isEmpty()) {
final String currentClassName = getCurrentClassName(stepThread);
if (currentClassName == null || !DebuggerUtilsEx.isFiltered(currentClassName, activeFilters)) {
// add class filters
for (ClassFilter filter : activeFilters) {
stepRequest.addClassExclusionFilter(filter.getPattern());
}
}
}
}
// suspend policy to match the suspend policy of the context:
// if all threads were suspended, then during stepping all the threads must be suspended
// if only event thread were suspended, then only this particular thread must be suspended during stepping
stepRequest.setSuspendPolicy(Registry.is("debugger.step.resumes.one.thread") ? EventRequest.SUSPEND_EVENT_THREAD
: suspendContext.getSuspendPolicy());
if (hint != null) {
//noinspection HardCodedStringLiteral
stepRequest.putProperty("hint", hint);
}
stepRequest.enable();
}
catch (ObjectCollectedException ignored) {
}
}
示例5: addExcludes
import com.sun.jdi.request.StepRequest; //导入方法依赖的package包/类
void addExcludes(StepRequest request) {
for (String pattern : excludes()) {
request.addClassExclusionFilter(pattern);
}
}