作者:暴躁的玩具 | 来源:互联网 | 2023-06-10 12:15
本文整理了Java中javax.xml.bind.helpers.ValidationEventLocatorImpl.setObject()方法的一些代码示例,展示了ValidationEventL
本文整理了Java中javax.xml.bind.helpers.ValidationEventLocatorImpl.setObject()
方法的一些代码示例,展示了ValidationEventLocatorImpl.setObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ValidationEventLocatorImpl.setObject()
方法的具体详情如下:
包路径:javax.xml.bind.helpers.ValidationEventLocatorImpl
类名称:ValidationEventLocatorImpl
方法名:setObject
ValidationEventLocatorImpl.setObject介绍
[英]Set the Object field on this event locator. Null values are allowed.
[中]在此事件定位器上设置对象字段。允许使用空值。
代码示例
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.moxy
private void handleException(SAXParseException exception, int severity) throws SAXException {
ValidationEventLocatorImpl eventLocator = new ValidationEventLocatorImpl(exception);
if(exception instanceof MarshalSAXParseException) {
eventLocator.setObject(((MarshalSAXParseException) exception).getObject());
}
Throwable linkedException = exception.getCause();
if(linkedException instanceof EclipseLinkException) {
linkedException = exception.getCause();
}
ValidationEvent event = new ValidationEventImpl(severity, exception.getLocalizedMessage(), eventLocator, linkedException);
if (!eventHandler.handleEvent(event)) {
if(linkedException instanceof EclipseLinkException) {
throw (EclipseLinkException) linkedException;
}
throw exception;
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
private void handleException(SAXParseException exception, int severity) throws SAXException {
ValidationEventLocatorImpl eventLocator = new ValidationEventLocatorImpl(exception);
if(exception instanceof MarshalSAXParseException) {
eventLocator.setObject(((MarshalSAXParseException) exception).getObject());
}
Throwable linkedException = exception.getCause();
if(linkedException instanceof EclipseLinkException) {
linkedException = exception.getCause();
}
ValidationEvent event = new ValidationEventImpl(severity, exception.getLocalizedMessage(), eventLocator, linkedException);
if (!eventHandler.handleEvent(event)) {
if(linkedException instanceof EclipseLinkException) {
throw (EclipseLinkException) linkedException;
}
throw exception;
}
}