0
我工作的EWS的Java API,我想知道如果附件类型的Java EWS - 如何让附件类型
- ItemAttachment
- FileAttachment的
像这样的
if (attachment is ItemAttachment) // how to in Java api?
if (attachment is FileAttachment) // how to in Java api?
我工作的EWS的Java API,我想知道如果附件类型的Java EWS - 如何让附件类型
像这样的
if (attachment is ItemAttachment) // how to in Java api?
if (attachment is FileAttachment) // how to in Java api?
您可以使用instanceof
:
if (attachment instanceof ItemAttachment) {
...
}