Java 类javax.xml.stream.util.XMLEventAllocator 实例源码

项目:OpenJSharp    文件:StAXEventReader.java   
public StAXEventReader(XMLStreamReader reader) throws  XMLStreamException {
    _streamReader = reader ;
    _eventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
    if(_eventAllocator == null){
        _eventAllocator = new StAXEventAllocatorBase();
    }
    //initialize
    if (_streamReader.hasNext())
    {
        _streamReader.next();
        _currentEvent =_eventAllocator.allocate(_streamReader);
        events[0] = _currentEvent;
        hasEvent = true;
    } else {
        throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
    }
}
项目:openjdk-jdk10    文件:StAXEventReader.java   
public StAXEventReader(XMLStreamReader reader) throws  XMLStreamException {
    _streamReader = reader ;
    _eventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
    if(_eventAllocator == null){
        _eventAllocator = new StAXEventAllocatorBase();
    }
    //initialize
    if (_streamReader.hasNext())
    {
        _streamReader.next();
        _currentEvent =_eventAllocator.allocate(_streamReader);
        events[0] = _currentEvent;
        hasEvent = true;
    } else {
        throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
    }
}
项目:openjdk9    文件:StAXEventReader.java   
public StAXEventReader(XMLStreamReader reader) throws  XMLStreamException {
    _streamReader = reader ;
    _eventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
    if(_eventAllocator == null){
        _eventAllocator = new StAXEventAllocatorBase();
    }
    //initialize
    if (_streamReader.hasNext())
    {
        _streamReader.next();
        _currentEvent =_eventAllocator.allocate(_streamReader);
        events[0] = _currentEvent;
        hasEvent = true;
    } else {
        throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:StAXEventReader.java   
public StAXEventReader(XMLStreamReader reader) throws  XMLStreamException {
    _streamReader = reader ;
    _eventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
    if(_eventAllocator == null){
        _eventAllocator = new StAXEventAllocatorBase();
    }
    //initialize
    if (_streamReader.hasNext())
    {
        _streamReader.next();
        _currentEvent =_eventAllocator.allocate(_streamReader);
        events[0] = _currentEvent;
        hasEvent = true;
    } else {
        throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
    }
}
项目:infobip-open-jdk-8    文件:StAXEventReader.java   
public StAXEventReader(XMLStreamReader reader) throws  XMLStreamException {
    _streamReader = reader ;
    _eventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
    if(_eventAllocator == null){
        _eventAllocator = new StAXEventAllocatorBase();
    }
    //initialize
    if (_streamReader.hasNext())
    {
        _streamReader.next();
        _currentEvent =_eventAllocator.allocate(_streamReader);
        events[0] = _currentEvent;
        hasEvent = true;
    } else {
        throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
    }
}
项目:OLD-OpenJDK8    文件:StAXEventReader.java   
public StAXEventReader(XMLStreamReader reader) throws  XMLStreamException {
    _streamReader = reader ;
    _eventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
    if(_eventAllocator == null){
        _eventAllocator = new StAXEventAllocatorBase();
    }
    //initialize
    if (_streamReader.hasNext())
    {
        _streamReader.next();
        _currentEvent =_eventAllocator.allocate(_streamReader);
        events[0] = _currentEvent;
        hasEvent = true;
    } else {
        throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
    }
}
项目:openjdk-icedtea7    文件:StAXEventReader.java   
public StAXEventReader(XMLStreamReader reader) throws  XMLStreamException {
    _streamReader = reader ;
    _eventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
    if(_eventAllocator == null){
        _eventAllocator = new StAXEventAllocatorBase();
    }
    //initialize
    if (_streamReader.hasNext())
    {
        _streamReader.next();
        _currentEvent =_eventAllocator.allocate(_streamReader);
        events[0] = _currentEvent;
        hasEvent = true;
    } else {
        throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
    }
}
项目:xmlsec-gost    文件:XMLSecEventAllocator.java   
@Override
public XMLEventAllocator newInstance() {
    try {
        return new XMLSecEventAllocator();
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
项目:javify    文件:XMLInputFactoryImpl.java   
public void setProperty(String name, Object value)
  throws IllegalArgumentException
{
  if (name.equals(IS_NAMESPACE_AWARE))
    namespaceAware = ((Boolean) value).booleanValue();
  else if (name.equals(IS_VALIDATING))
    validating = ((Boolean) value).booleanValue();
  else if (name.equals(IS_COALESCING))
    coalescing = ((Boolean) value).booleanValue();
  else if (name.equals(IS_REPLACING_ENTITY_REFERENCES))
    replacingEntityReferences = ((Boolean) value).booleanValue();
  else if (name.equals(IS_SUPPORTING_EXTERNAL_ENTITIES))
    externalEntities = ((Boolean) value).booleanValue();
  else if (name.equals(SUPPORT_DTD))
    supportDTD = ((Boolean) value).booleanValue();
  else if (name.equals(REPORTER))
    reporter = (XMLReporter) value;
  else if (name.equals(RESOLVER))
    resolver = (XMLResolver) value;
  else if (name.equals(ALLOCATOR))
    allocator = (XMLEventAllocator) value;
  else if (name.equals("gnu.xml.stream.stringInterning"))
    stringInterning = ((Boolean) value).booleanValue();
  else if (name.equals("gnu.xml.stream.baseAware"))
    baseAware = ((Boolean) value).booleanValue();
  else if (name.equals("gnu.xml.stream.xIncludeAware"))
    xIncludeAware = ((Boolean) value).booleanValue();
  else
    throw new IllegalArgumentException(name);
}
项目:javify    文件:XMLEventReaderImpl.java   
protected XMLEventReaderImpl(XMLStreamReader reader,
                             XMLEventAllocator allocator,
                             String systemId)
{
  this.reader = reader;
  this.allocator = allocator;
  this.systemId = systemId;
}
项目:jvm-stm    文件:XMLInputFactoryImpl.java   
public void setProperty(String name, Object value)
  throws IllegalArgumentException
{
  if (name.equals(IS_NAMESPACE_AWARE))
    namespaceAware = ((Boolean) value).booleanValue();
  else if (name.equals(IS_VALIDATING))
    validating = ((Boolean) value).booleanValue();
  else if (name.equals(IS_COALESCING))
    coalescing = ((Boolean) value).booleanValue();
  else if (name.equals(IS_REPLACING_ENTITY_REFERENCES))
    replacingEntityReferences = ((Boolean) value).booleanValue();
  else if (name.equals(IS_SUPPORTING_EXTERNAL_ENTITIES))
    externalEntities = ((Boolean) value).booleanValue();
  else if (name.equals(SUPPORT_DTD))
    supportDTD = ((Boolean) value).booleanValue();
  else if (name.equals(REPORTER))
    reporter = (XMLReporter) value;
  else if (name.equals(RESOLVER))
    resolver = (XMLResolver) value;
  else if (name.equals(ALLOCATOR))
    allocator = (XMLEventAllocator) value;
  else if (name.equals("gnu.xml.stream.stringInterning"))
    stringInterning = ((Boolean) value).booleanValue();
  else if (name.equals("gnu.xml.stream.baseAware"))
    baseAware = ((Boolean) value).booleanValue();
  else if (name.equals("gnu.xml.stream.xIncludeAware"))
    xIncludeAware = ((Boolean) value).booleanValue();
  else
    throw new IllegalArgumentException(name);
}
项目:jvm-stm    文件:XMLEventReaderImpl.java   
protected XMLEventReaderImpl(XMLStreamReader reader,
                             XMLEventAllocator allocator,
                             String systemId)
{
  this.reader = reader;
  this.allocator = allocator;
  this.systemId = systemId;
}
项目:woodstox    文件:WstxInputFactory.java   
@Override
public void setProperty(String propName, Object value)
{
    if (!mConfig.setProperty(propName, value)) {
        if (XMLInputFactory.ALLOCATOR.equals(propName)) {
            setEventAllocator((XMLEventAllocator) value);
        }
    }
}
项目:woodstox    文件:WstxInputFactory.java   
protected XMLEventAllocator createEventAllocator() 
{
    // Explicitly set allocate?
    if (mAllocator != null) {
        return mAllocator.newInstance();
    }

    /* Complete or fast one? Note: standard allocator is designed
     * in such a way that newInstance() need not be called (calling
     * it wouldn't do anything, anyway)
     */
    return mConfig.willPreserveLocation() ?
        DefaultEventAllocator.getDefaultInstance()
        : DefaultEventAllocator.getFastInstance();
}
项目:JamVM-PH    文件:XMLInputFactoryImpl.java   
public void setProperty(String name, Object value)
  throws IllegalArgumentException
{
  if (name.equals(IS_NAMESPACE_AWARE))
    namespaceAware = ((Boolean) value).booleanValue();
  else if (name.equals(IS_VALIDATING))
    validating = ((Boolean) value).booleanValue();
  else if (name.equals(IS_COALESCING))
    coalescing = ((Boolean) value).booleanValue();
  else if (name.equals(IS_REPLACING_ENTITY_REFERENCES))
    replacingEntityReferences = ((Boolean) value).booleanValue();
  else if (name.equals(IS_SUPPORTING_EXTERNAL_ENTITIES))
    externalEntities = ((Boolean) value).booleanValue();
  else if (name.equals(SUPPORT_DTD))
    supportDTD = ((Boolean) value).booleanValue();
  else if (name.equals(REPORTER))
    reporter = (XMLReporter) value;
  else if (name.equals(RESOLVER))
    resolver = (XMLResolver) value;
  else if (name.equals(ALLOCATOR))
    allocator = (XMLEventAllocator) value;
  else if (name.equals("gnu.xml.stream.stringInterning"))
    stringInterning = ((Boolean) value).booleanValue();
  else if (name.equals("gnu.xml.stream.baseAware"))
    baseAware = ((Boolean) value).booleanValue();
  else if (name.equals("gnu.xml.stream.xIncludeAware"))
    xIncludeAware = ((Boolean) value).booleanValue();
  else
    throw new IllegalArgumentException(name);
}
项目:JamVM-PH    文件:XMLEventReaderImpl.java   
protected XMLEventReaderImpl(XMLStreamReader reader,
                             XMLEventAllocator allocator,
                             String systemId)
{
  this.reader = reader;
  this.allocator = allocator;
  this.systemId = systemId;
}
项目:classpath    文件:XMLInputFactoryImpl.java   
public void setProperty(String name, Object value)
  throws IllegalArgumentException
{
  if (name.equals(IS_NAMESPACE_AWARE))
    namespaceAware = ((Boolean) value).booleanValue();
  else if (name.equals(IS_VALIDATING))
    validating = ((Boolean) value).booleanValue();
  else if (name.equals(IS_COALESCING))
    coalescing = ((Boolean) value).booleanValue();
  else if (name.equals(IS_REPLACING_ENTITY_REFERENCES))
    replacingEntityReferences = ((Boolean) value).booleanValue();
  else if (name.equals(IS_SUPPORTING_EXTERNAL_ENTITIES))
    externalEntities = ((Boolean) value).booleanValue();
  else if (name.equals(SUPPORT_DTD))
    supportDTD = ((Boolean) value).booleanValue();
  else if (name.equals(REPORTER))
    reporter = (XMLReporter) value;
  else if (name.equals(RESOLVER))
    resolver = (XMLResolver) value;
  else if (name.equals(ALLOCATOR))
    allocator = (XMLEventAllocator) value;
  else if (name.equals("gnu.xml.stream.stringInterning"))
    stringInterning = ((Boolean) value).booleanValue();
  else if (name.equals("gnu.xml.stream.baseAware"))
    baseAware = ((Boolean) value).booleanValue();
  else if (name.equals("gnu.xml.stream.xIncludeAware"))
    xIncludeAware = ((Boolean) value).booleanValue();
  else
    throw new IllegalArgumentException(name);
}
项目:classpath    文件:XMLEventReaderImpl.java   
protected XMLEventReaderImpl(XMLStreamReader reader,
                             XMLEventAllocator allocator,
                             String systemId)
{
  this.reader = reader;
  this.allocator = allocator;
  this.systemId = systemId;
}
项目:OpenJSharp    文件:StAXInputFactory.java   
public XMLEventAllocator getEventAllocator() {
    return (XMLEventAllocator)getProperty(XMLInputFactory.ALLOCATOR);
}
项目:OpenJSharp    文件:StAXInputFactory.java   
/** Set a user defined event allocator for events
 * @param allocator the user defined allocator
 */
public void setEventAllocator(XMLEventAllocator allocator) {
    _manager.setProperty(XMLInputFactory.ALLOCATOR, allocator);
}
项目:OpenJSharp    文件:StAXEventReader.java   
public void setAllocator(XMLEventAllocator allocator) {
    if (allocator == null)
        throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.nullXMLEventAllocator"));

    _eventAllocator = allocator;
}
项目:OpenJSharp    文件:XMLInputFactoryImpl.java   
public XMLEventAllocator getEventAllocator() {
    return (XMLEventAllocator)getProperty(XMLInputFactory.ALLOCATOR);
}
项目:OpenJSharp    文件:XMLInputFactoryImpl.java   
/** Set a user defined event allocator for events
 * @param allocator the user defined allocator
 */
public void setEventAllocator(XMLEventAllocator allocator) {
    fPropertyManager.setProperty(XMLInputFactory.ALLOCATOR, allocator);
}
项目:OpenJSharp    文件:XMLEventAllocatorImpl.java   
public javax.xml.stream.util.XMLEventAllocator newInstance() {
    return new XMLEventAllocatorImpl();
}
项目:openjdk-jdk10    文件:StAXInputFactory.java   
public XMLEventAllocator getEventAllocator() {
    return (XMLEventAllocator)getProperty(XMLInputFactory.ALLOCATOR);
}
项目:openjdk-jdk10    文件:StAXInputFactory.java   
/** Set a user defined event allocator for events
 * @param allocator the user defined allocator
 */
public void setEventAllocator(XMLEventAllocator allocator) {
    _manager.setProperty(XMLInputFactory.ALLOCATOR, allocator);
}
项目:openjdk-jdk10    文件:StAXEventReader.java   
public void setAllocator(XMLEventAllocator allocator) {
    if (allocator == null)
        throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.nullXMLEventAllocator"));

    _eventAllocator = allocator;
}
项目:openjdk-jdk10    文件:XMLInputFactoryImpl.java   
public XMLEventAllocator getEventAllocator() {
    return (XMLEventAllocator)getProperty(XMLInputFactory.ALLOCATOR);
}
项目:openjdk-jdk10    文件:XMLInputFactoryImpl.java   
/** Set a user defined event allocator for events
 * @param allocator the user defined allocator
 */
public void setEventAllocator(XMLEventAllocator allocator) {
    fPropertyManager.setProperty(XMLInputFactory.ALLOCATOR, allocator);
}
项目:openjdk-jdk10    文件:XMLEventAllocatorImpl.java   
public javax.xml.stream.util.XMLEventAllocator newInstance() {
    return new XMLEventAllocatorImpl();
}
项目:openjdk-jdk10    文件:MyInputFactory.java   
@Override
public void setEventAllocator(XMLEventAllocator allocator) {
    throw new UnsupportedOperationException("Not supported yet.");
}
项目:openjdk-jdk10    文件:MyInputFactory.java   
@Override
public XMLEventAllocator getEventAllocator() {
    throw new UnsupportedOperationException("Not supported yet.");
}
项目:openjdk-jdk10    文件:XMLInputFactoryWrapper.java   
@Override
public void setEventAllocator(XMLEventAllocator allocator) {
    defaultImpl.setEventAllocator(allocator);
}
项目:openjdk-jdk10    文件:XMLInputFactoryWrapper.java   
@Override
public XMLEventAllocator getEventAllocator() {
    return defaultImpl.getEventAllocator();
}
项目:openjdk-jdk10    文件:XMLInputFactoryImpl.java   
@Override
public XMLEventAllocator getEventAllocator() {
    return null;
}
项目:openjdk9    文件:StAXInputFactory.java   
public XMLEventAllocator getEventAllocator() {
    return (XMLEventAllocator)getProperty(XMLInputFactory.ALLOCATOR);
}
项目:openjdk9    文件:StAXInputFactory.java   
/** Set a user defined event allocator for events
 * @param allocator the user defined allocator
 */
public void setEventAllocator(XMLEventAllocator allocator) {
    _manager.setProperty(XMLInputFactory.ALLOCATOR, allocator);
}
项目:openjdk9    文件:StAXEventReader.java   
public void setAllocator(XMLEventAllocator allocator) {
    if (allocator == null)
        throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.nullXMLEventAllocator"));

    _eventAllocator = allocator;
}
项目:openjdk9    文件:XMLInputFactoryImpl.java   
public XMLEventAllocator getEventAllocator() {
    return (XMLEventAllocator)getProperty(XMLInputFactory.ALLOCATOR);
}
项目:openjdk9    文件:XMLInputFactoryImpl.java   
/** Set a user defined event allocator for events
 * @param allocator the user defined allocator
 */
public void setEventAllocator(XMLEventAllocator allocator) {
    fPropertyManager.setProperty(XMLInputFactory.ALLOCATOR, allocator);
}