/*
* @see Instruction#execute()
*/
@Override
public void execute() throws CoreException {
IJavaType type = (IJavaType) pop();
IJavaValue value = popValue();
if (value instanceof JDINullValue) {
pushNewValue(false);
return;
}
IJavaObject object = (IJavaObject) value;
IJavaObject classObject = getClassObject(type);
if (classObject == null) {
throw new CoreException(
new Status(
IStatus.ERROR,
JDIDebugPlugin.getUniqueIdentifier(),
IStatus.OK,
NLS.bind(InstructionsEvaluationMessages.InstanceOfOperator_No_class_object,
new String[] { type.getName() }),
null));
}
push(classObject.sendMessage(IS_INSTANCE, IS_INSTANCE_SIGNATURE,
new IJavaValue[] { object }, getContext().getThread(), false));
}