本文整理汇总了Java中com.intellij.debugger.engine.DebuggerUtils.instanceOf方法的典型用法代码示例。如果您正苦于以下问题:Java DebuggerUtils.instanceOf方法的具体用法?Java DebuggerUtils.instanceOf怎么用?Java DebuggerUtils.instanceOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.debugger.engine.DebuggerUtils
的用法示例。
在下文中一共展示了DebuggerUtils.instanceOf方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: evaluate
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
@Override
public Object evaluate(EvaluationContextImpl context) throws EvaluateException
{
Object result = context.getSuspendContext().getDebugProcess().getVirtualMachineProxy().mirrorOfVoid();
try
{
result = myBodyEvaluator.evaluate(context);
}
catch(EvaluateException e)
{
boolean catched = false;
ObjectReference vmException = e.getExceptionFromTargetVM();
if(vmException != null)
{
for(CatchEvaluator evaluator : myCatchBlockEvaluators)
{
if(evaluator != null && DebuggerUtils.instanceOf(vmException.type(), evaluator.getExceptionType()))
{
result = evaluator.evaluate(vmException, context);
catched = true;
break;
}
}
}
if(!catched)
{
throw e;
}
}
finally
{
if(myFinallyEvaluator != null)
{
result = myFinallyEvaluator.evaluate(context);
}
}
return result;
}
示例2: isFiltered
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
private boolean isFiltered(Type t)
{
if(t instanceof ReferenceType)
{
for(ClassFilter classFilter : myClassFilters)
{
if(classFilter.isEnabled() && DebuggerUtils.instanceOf(t, classFilter.getPattern()))
{
return true;
}
}
}
return DebuggerUtilsEx.isFiltered(t.name(), myClassFilters);
}
示例3: isApplicable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public boolean isApplicable(Type type)
{
if(DebuggerUtils.instanceOf(type, getClassName()))
{
return super.isApplicable(type);
}
return false;
}
示例4: evaluate
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public Object evaluate(EvaluationContextImpl context) throws EvaluateException {
Value value = (Value)myOperandEvaluator.evaluate(context);
if (value == null) {
if (myIsPrimitive) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.cannot.cast.null", myCastType));
}
return null;
}
VirtualMachineProxyImpl vm = context.getDebugProcess().getVirtualMachineProxy();
if (DebuggerUtils.isInteger(value)) {
value = DebuggerUtilsEx.createValue(vm, myCastType, ((PrimitiveValue)value).longValue());
if (value == null) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.cannot.cast.numeric", myCastType));
}
}
else if (DebuggerUtils.isNumeric(value)) {
value = DebuggerUtilsEx.createValue(vm, myCastType, ((PrimitiveValue)value).doubleValue());
if (value == null) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.cannot.cast.numeric", myCastType));
}
}
else if (value instanceof BooleanValue) {
value = DebuggerUtilsEx.createValue(vm, myCastType, ((BooleanValue)value).booleanValue());
if (value == null) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.cannot.cast.boolean", myCastType));
}
}
else if (value instanceof CharValue) {
value = DebuggerUtilsEx.createValue(vm, myCastType, ((CharValue)value).charValue());
if (value == null) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.cannot.cast.char", myCastType));
}
}
else if (value instanceof ObjectReference) {
Type type = value.type();
if (!DebuggerUtils.instanceOf(type, myCastType)) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.cannot.cast.object", type.name(), myCastType));
}
}
return value;
}
示例5: isApplicable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public boolean isApplicable(Type type) {
if(type == null || !(type instanceof ReferenceType) || !DebuggerUtils.instanceOf(type, getClassName())) {
return false;
}
return super.isApplicable(type);
}
示例6: isApplicable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public boolean isApplicable(Type type) {
return type != null && type instanceof ReferenceType && DebuggerUtils.instanceOf(type, getClassName());
}
示例7: isApplicable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
@Override
public boolean isApplicable(Type type) {
return type instanceof ReferenceType && DebuggerUtils.instanceOf(type, GroovyCommonClassNames.GROOVY_LANG_REFERENCE);
}
示例8: isApplicable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
@Override
public boolean isApplicable(Type type)
{
return DebuggerUtils.instanceOf(type, getClassName());
}
示例9: isApplicable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public boolean isApplicable(Type type)
{
return type instanceof ReferenceType && DebuggerUtils.instanceOf(type, getClassName());
}