当前位置: 首页>>代码示例>>Java>>正文


Java JDWP类代码示例

本文整理汇总了Java中com.sun.tools.jdi.JDWP的典型用法代码示例。如果您正苦于以下问题:Java JDWP类的具体用法?Java JDWP怎么用?Java JDWP使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JDWP类属于com.sun.tools.jdi包,在下文中一共展示了JDWP类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ExceptionRequestImpl

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
ExceptionRequestImpl(ReferenceType refType,
                  boolean notifyCaught, boolean notifyUncaught) {
    exception = refType;
    caught = notifyCaught;
    uncaught = notifyUncaught;
    {
        ReferenceTypeImpl exc;
        if (exception == null) {
            exc = new ClassTypeImpl(vm, 0);
        } else {
            exc = (ReferenceTypeImpl)exception;
        }
        filters.add(JDWP.EventRequest.Set.Modifier.ExceptionOnly.
                    create(exc, caught, uncaught));
    }
    requestList().add(this);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:EventRequestManagerImpl.java

示例2: MethodExitRequestImpl

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
MethodExitRequestImpl() {
    if (methodExitEventCmd == 0) {
        /*
         * If we can get return values, then we always get them.
         * Thus, for JDI MethodExitRequests, we always use the
         * same JDWP EventKind.  Here we decide which to use and
         * save it so that it will be used for all future
         * MethodExitRequests.
         *
         * This call to canGetMethodReturnValues can't
         * be done in the EventRequestManager ctor because that is too early.
         */
        if (vm.canGetMethodReturnValues()) {
            methodExitEventCmd = JDWP.EventKind.METHOD_EXIT_WITH_RETURN_VALUE;
        } else {
            methodExitEventCmd = JDWP.EventKind.METHOD_EXIT;
        }
    }
    requestList().add(this);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:EventRequestManagerImpl.java

示例3: EventRequestManagerImpl

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
/**
 * Constructor.
 */
EventRequestManagerImpl(VirtualMachine vm) {
    super(vm);
    java.lang.reflect.Field[] ekinds =
        JDWP.EventKind.class.getDeclaredFields();
    int highest = 0;
    for (int i = 0; i < ekinds.length; ++i) {
        int val;
        try {
            val = ekinds[i].getInt(null);
        } catch (IllegalAccessException exc) {
            throw new RuntimeException("Got: " + exc);
        }
        if (val > highest) {
            highest = val;
        }
    }
    requestLists = new List[highest+1];
    for (int i=0; i <= highest; i++) {
        requestLists[i] = new ArrayList<>();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:EventRequestManagerImpl.java

示例4: EventRequestManagerImpl

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
/**
 * Constructor.
 */
EventRequestManagerImpl(VirtualMachine vm) {
    super(vm);
    java.lang.reflect.Field[] ekinds =
        JDWP.EventKind.class.getDeclaredFields();
    int highest = 0;
    for (int i = 0; i < ekinds.length; ++i) {
        int val;
        try {
            val = ekinds[i].getInt(null);
        } catch (IllegalAccessException exc) {
            throw new RuntimeException("Got: " + exc);
        }
        if (val > highest) {
            highest = val;
        }
    }
    requestLists = new List[highest+1];
    for (int i=0; i <= highest; i++) {
        requestLists[i] = Collections.synchronizedList(new ArrayList<>());
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:25,代码来源:EventRequestManagerImpl.java

示例5: JDWPtoJDISuspendPolicy

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
static int JDWPtoJDISuspendPolicy(byte jdwpPolicy) {
    switch(jdwpPolicy) {
        case JDWP.SuspendPolicy.ALL:
            return EventRequest.SUSPEND_ALL;
        case JDWP.SuspendPolicy.EVENT_THREAD:
            return EventRequest.SUSPEND_EVENT_THREAD;
    case JDWP.SuspendPolicy.NONE:
            return EventRequest.SUSPEND_NONE;
        default:
            throw new IllegalArgumentException("Illegal policy constant: " + jdwpPolicy);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:EventRequestManagerImpl.java

示例6: JDItoJDWPSuspendPolicy

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
static byte JDItoJDWPSuspendPolicy(int jdiPolicy) {
    switch(jdiPolicy) {
        case EventRequest.SUSPEND_ALL:
            return JDWP.SuspendPolicy.ALL;
        case EventRequest.SUSPEND_EVENT_THREAD:
            return JDWP.SuspendPolicy.EVENT_THREAD;
        case EventRequest.SUSPEND_NONE:
            return JDWP.SuspendPolicy.NONE;
        default:
            throw new IllegalArgumentException("Illegal policy constant: " + jdiPolicy);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:EventRequestManagerImpl.java

示例7: addCountFilter

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
public synchronized void addCountFilter(int count) {
    if (isEnabled() || deleted) {
        throw invalidState();
    }
    if (count < 1) {
        throw new IllegalArgumentException("count is less than one");
    }
    filters.add(JDWP.EventRequest.Set.Modifier.Count.create(count));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:EventRequestManagerImpl.java

示例8: set

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
/**
 * set (enable) the event request
 */
synchronized void set() {
    JDWP.EventRequest.Set.Modifier[] mods =
        filters.toArray(
            new JDWP.EventRequest.Set.Modifier[filters.size()]);
    try {
        id = JDWP.EventRequest.Set.process(vm, (byte)eventCmd(),
                                           suspendPolicy, mods).requestID;
    } catch (JDWPException exc) {
        throw exc.toJDIException();
    }
    isEnabled = true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:EventRequestManagerImpl.java

示例9: clear

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
synchronized void clear() {
    try {
        JDWP.EventRequest.Clear.process(vm, (byte)eventCmd(), id);
    } catch (JDWPException exc) {
        throw exc.toJDIException();
    }
    isEnabled = false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:EventRequestManagerImpl.java

示例10: addThreadFilter

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
public synchronized void addThreadFilter(ThreadReference thread) {
    validateMirror(thread);
    if (isEnabled() || deleted) {
        throw invalidState();
    }
    filters.add(JDWP.EventRequest.Set.Modifier.ThreadOnly
                              .create((ThreadReferenceImpl)thread));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:EventRequestManagerImpl.java

示例11: addClassFilter

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
public synchronized void addClassFilter(ReferenceType clazz) {
    validateMirror(clazz);
    if (isEnabled() || deleted) {
        throw invalidState();
    }
    filters.add(JDWP.EventRequest.Set.Modifier.ClassOnly
                              .create((ReferenceTypeImpl)clazz));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:EventRequestManagerImpl.java

示例12: addClassExclusionFilter

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
public synchronized void addClassExclusionFilter(String classPattern) {
    if (isEnabled() || deleted) {
        throw invalidState();
    }
    if (classPattern == null) {
        throw new NullPointerException();
    }
    filters.add(JDWP.EventRequest.Set.Modifier.ClassExclude
                              .create(classPattern));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:EventRequestManagerImpl.java

示例13: addInstanceFilter

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
public synchronized void addInstanceFilter(ObjectReference instance) {
    validateMirror(instance);
    if (isEnabled() || deleted) {
        throw invalidState();
    }
    if (!vm.canUseInstanceFilters()) {
        throw new UnsupportedOperationException(
             "target does not support instance filters");
    }
    filters.add(JDWP.EventRequest.Set.Modifier.InstanceOnly
                              .create((ObjectReferenceImpl)instance));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:EventRequestManagerImpl.java

示例14: addSourceNameFilter

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
public synchronized void addSourceNameFilter(String sourceNamePattern) {
    if (isEnabled() || deleted) {
        throw invalidState();
    }
    if (!vm.canUseSourceNameFilters()) {
        throw new UnsupportedOperationException(
             "target does not support source name filters");
    }
    if (sourceNamePattern == null) {
        throw new NullPointerException();
    }

    filters.add(JDWP.EventRequest.Set.Modifier.SourceNameMatch
                              .create(sourceNamePattern));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:EventRequestManagerImpl.java

示例15: WatchpointRequestImpl

import com.sun.tools.jdi.JDWP; //导入依赖的package包/类
WatchpointRequestImpl(Field field) {
    this.field = field;
    filters.add(0,
           JDWP.EventRequest.Set.Modifier.FieldOnly.create(
            (ReferenceTypeImpl)field.declaringType(),
            ((FieldImpl)field).ref()));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:EventRequestManagerImpl.java


注:本文中的com.sun.tools.jdi.JDWP类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。