gpt4 book ai didi

com.sun.xml.bind.v2.runtime.XMLSerializer.getCurrentLocation()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 23:11:05 26 4
gpt4 key购买 nike

本文整理了Java中com.sun.xml.bind.v2.runtime.XMLSerializer.getCurrentLocation()方法的一些代码示例,展示了XMLSerializer.getCurrentLocation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSerializer.getCurrentLocation()方法的具体详情如下:
包路径:com.sun.xml.bind.v2.runtime.XMLSerializer
类名称:XMLSerializer
方法名:getCurrentLocation

XMLSerializer.getCurrentLocation介绍

暂无

代码示例

代码示例来源:origin: com.sun.xml.bind/jaxb-impl

protected ValidationEventLocator getLocation() {
  return getCurrentLocation(null);
}

代码示例来源:origin: com.sun.xml.bind/jaxb-impl

/**
 * Report an error found as an exception.
 *
 * @param fieldName
 *      the name of the property being processed when an error is found.
 */
public final void reportError(String fieldName, Throwable t) throws SAXException {
  ValidationEvent ve = new ValidationEventImpl(ValidationEvent.ERROR,
    t.getMessage(), getCurrentLocation(fieldName), t);
  reportError(ve);
}

代码示例来源:origin: com.sun.xml.bind/jaxb-impl

private void reportMissingObjectError(String fieldName) throws SAXException {
  reportError(new ValidationEventImpl(
    ValidationEvent.ERROR,
    Messages.MISSING_OBJECT.format(fieldName),
      getCurrentLocation(fieldName),
    new NullPointerException() ));
}

代码示例来源:origin: com.sun.xml.bind/jaxb-impl

ValidationEvent.ERROR,
Messages.NO_IMAGE_WRITER.format(mimeType),
xs.getCurrentLocation(null) ));

代码示例来源:origin: com.sun.xml.bind/jaxb-impl

public String print(XMLGregorianCalendar cal) {
  XMLSerializer xs = XMLSerializer.getInstance();
  QName type = xs.getSchemaType();
  if (type != null) {
    try {
      checkXmlGregorianCalendarFieldRef(type, cal);
      String format = xmlGregorianCalendarFormatString.get(type);
      if (format != null) {
        return format(format, cal);
      }
    } catch (javax.xml.bind.MarshalException e) {
      // see issue 649
      xs.handleEvent(new ValidationEventImpl(ValidationEvent.WARNING, e.getMessage(),
        xs.getCurrentLocation(null) ));
      return "";
    }
  }
  return cal.toXMLFormat();
}

代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime

protected ValidationEventLocator getLocation() {
  return getCurrentLocation(null);
}

代码示例来源:origin: com.sun.xml.bind/jaxb-impl

ValidationEvent.ERROR,
  Messages.CYCLE_IN_MARSHALLER.format(cycleDetectionStack.getCycleString()),
  getCurrentLocation(fieldName),
  null));
return null;

代码示例来源:origin: com.sun.xml.bind/jaxb-impl

child.getClass().getName(),
  actual.jaxbType.getName()),
getCurrentLocation(fieldName)));

代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime

/**
 * Report an error found as an exception.
 *
 * @param fieldName
 *      the name of the property being processed when an error is found.
 */
public final void reportError(String fieldName, Throwable t) throws SAXException {
  ValidationEvent ve = new ValidationEventImpl(ValidationEvent.ERROR,
    t.getMessage(), getCurrentLocation(fieldName), t);
  reportError(ve);
}

代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime

private void reportMissingObjectError(String fieldName) throws SAXException {
  reportError(new ValidationEventImpl(
    ValidationEvent.ERROR,
    Messages.MISSING_OBJECT.format(fieldName),
      getCurrentLocation(fieldName),
    new NullPointerException() ));
}

代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime

ValidationEvent.ERROR,
Messages.NO_IMAGE_WRITER.format(mimeType),
xs.getCurrentLocation(null) ));

代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime

public String print(XMLGregorianCalendar cal) {
  XMLSerializer xs = XMLSerializer.getInstance();
  QName type = xs.getSchemaType();
  if (type != null) {
    try {
      checkXmlGregorianCalendarFieldRef(type, cal);
      String format = xmlGregorianCalendarFormatString.get(type);
      if (format != null) {
        return format(format, cal);
      }
    } catch (javax.xml.bind.MarshalException e) {
      // see issue 649
      xs.handleEvent(new ValidationEventImpl(ValidationEvent.WARNING, e.getMessage(),
        xs.getCurrentLocation(null) ));
      return "";
    }
  }
  return cal.toXMLFormat();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl

protected ValidationEventLocator getLocation() {
  return getCurrentLocation(null);
}

代码示例来源:origin: apache/servicemix-bundles

protected ValidationEventLocator getLocation() {
  return getCurrentLocation(null);
}

代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime

ValidationEvent.ERROR,
  Messages.CYCLE_IN_MARSHALLER.format(cycleDetectionStack.getCycleString()),
  getCurrentLocation(fieldName),
  null));
return null;

代码示例来源:origin: org.glassfish.jaxb/jaxb-runtime

child.getClass().getName(),
  actual.jaxbType.getName()),
getCurrentLocation(fieldName)));

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl

/**
 * Report an error found as an exception.
 *
 * @param fieldName
 *      the name of the property being processed when an error is found.
 */
public final void reportError(String fieldName, Throwable t) throws SAXException {
  ValidationEvent ve = new ValidationEventImpl(ValidationEvent.ERROR,
    t.getMessage(), getCurrentLocation(fieldName), t);
  reportError(ve);
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Report an error found as an exception.
 *
 * @param fieldName
 *      the name of the property being processed when an error is found.
 */
public final void reportError(String fieldName, Throwable t) throws SAXException {
  ValidationEvent ve = new ValidationEventImpl(ValidationEvent.ERROR,
    t.getMessage(), getCurrentLocation(fieldName), t);
  reportError(ve);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl

private void reportMissingObjectError(String fieldName) throws SAXException {
  reportError(new ValidationEventImpl(
    ValidationEvent.ERROR,
    Messages.MISSING_OBJECT.format(fieldName),
      getCurrentLocation(fieldName),
    new NullPointerException() ));
}

代码示例来源:origin: apache/servicemix-bundles

private void reportMissingObjectError(String fieldName) throws SAXException {
  reportError(new ValidationEventImpl(
    ValidationEvent.ERROR,
    Messages.MISSING_OBJECT.format(fieldName),
      getCurrentLocation(fieldName),
    new NullPointerException() ));
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com