@Override public String toString() { StringBuilder builder = new StringBuilder(); if (this.getName() != null) { builder.append("name: ").append(getName()); } if (this.getPattern() != null) { builder.append("pattern: ").append(pattern); } if (this.getClassAvailableActivations() != null) { builder.append(getClassAvailableActivations()); } if (this.getSystemPropertyActivations() != null) { builder.append(getSystemPropertyActivations()); } return builder.toString(); } }
@Override public void processEndChildElement(String uri, String localName, String qName, String nestedText) { if (isFilterElement(uri, localName)) { Filter filter = null; if (WELD_URI.equals(uri)) { filter = new WeldFilterImpl(name, systemPropertyActivations, classAvailableActivations, pattern); } else { filter = new FilterImpl(name, systemPropertyActivations, classAvailableActivations); } Metadata<Filter> filterMetadata = new XmlMetadata<Filter>(qName, filter, file, locator.getLineNumber()); if (INCLUDE.equals(localName)) { includes.add(filterMetadata); } else if (EXCLUDE.equals(localName)) { excludes.add(filterMetadata); } // reset name = null; pattern = null; systemPropertyActivations = null; classAvailableActivations = null; } }
private void handleFilter(StartElement filterElement, XMLEventReader reader, Consumer<XmlMetadata<Filter>> consumer) throws XMLStreamException { String name = getAttribute(filterElement, NAME_ATTRIBUTE_NAME); String pattern = name != null ? null : getAttribute(filterElement, PATTERN_ATTRIBUTE_NAME); if (name != null || pattern != null) { List<Metadata<SystemPropertyActivation>> systemPropertyActivations = new LinkedList<>(); List<Metadata<ClassAvailableActivation>> classAvailableActivations = new LinkedList<>(); while (reader.hasNext()) { XMLEvent event = reader.nextEvent(); if (isEnd(event, EXCLUDE, SCANNING_URIS) || isEnd(event, INCLUDE, SCANNING_URIS)) { Filter filter; if (filterElement.getName().getNamespaceURI().equals(WELD_URI)) { filter = new WeldFilterImpl(name, systemPropertyActivations, classAvailableActivations, pattern); } else { filter = new FilterImpl(name, systemPropertyActivations, classAvailableActivations); } consumer.accept(new XmlMetadata<Filter>(filterElement.getName().toString(), filter, beansXml, filterElement.getLocation().getLineNumber())); return; } else if (event.isStartElement()) { StartElement element = (StartElement) event; if (isStartElement(element, IF_CLASS_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, false); } else if (isStartElement(element, IF_CLASS_NOT_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, true); } else if (isStartElement(element, IF_SYSTEM_PROPERTY, SCANNING_URIS)) { systemProperty(element, systemPropertyActivations::add); } } } } }
@Override public String toString() { StringBuilder builder = new StringBuilder(); if (this.getName() != null) { builder.append("name: ").append(getName()); } if (this.getPattern() != null) { builder.append("pattern: ").append(pattern); } if (this.getClassAvailableActivations() != null) { builder.append(getClassAvailableActivations()); } if (this.getSystemPropertyActivations() != null) { builder.append(getSystemPropertyActivations()); } return builder.toString(); } }
private void handleFilter(StartElement filterElement, XMLEventReader reader, Consumer<XmlMetadata<Filter>> consumer) throws XMLStreamException { String name = getAttribute(filterElement, NAME_ATTRIBUTE_NAME); String pattern = name != null ? null : getAttribute(filterElement, PATTERN_ATTRIBUTE_NAME); if (name != null || pattern != null) { List<Metadata<SystemPropertyActivation>> systemPropertyActivations = new LinkedList<>(); List<Metadata<ClassAvailableActivation>> classAvailableActivations = new LinkedList<>(); while (reader.hasNext()) { XMLEvent event = reader.nextEvent(); if (isEnd(event, EXCLUDE, SCANNING_URIS) || isEnd(event, INCLUDE, SCANNING_URIS)) { Filter filter; if (filterElement.getName().getNamespaceURI().equals(WELD_URI)) { filter = new WeldFilterImpl(name, systemPropertyActivations, classAvailableActivations, pattern); } else { filter = new FilterImpl(name, systemPropertyActivations, classAvailableActivations); } consumer.accept(new XmlMetadata<Filter>(filterElement.getName().toString(), filter, beansXml, filterElement.getLocation().getLineNumber())); return; } else if (event.isStartElement()) { StartElement element = (StartElement) event; if (isStartElement(element, IF_CLASS_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, false); } else if (isStartElement(element, IF_CLASS_NOT_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, true); } else if (isStartElement(element, IF_SYSTEM_PROPERTY, SCANNING_URIS)) { systemProperty(element, systemPropertyActivations::add); } } } } }
@Override public String toString() { StringBuilder builder = new StringBuilder(); if (this.getName() != null) { builder.append("name: ").append(getName()); } if (this.getPattern() != null) { builder.append("pattern: ").append(pattern); } if (this.getClassAvailableActivations() != null) { builder.append(getClassAvailableActivations()); } if (this.getSystemPropertyActivations() != null) { builder.append(getSystemPropertyActivations()); } return builder.toString(); } }
private void handleFilter(StartElement filterElement, XMLEventReader reader, Consumer<XmlMetadata<Filter>> consumer) throws XMLStreamException { String name = getAttribute(filterElement, NAME_ATTRIBUTE_NAME); String pattern = name != null ? null : getAttribute(filterElement, PATTERN_ATTRIBUTE_NAME); if (name != null || pattern != null) { List<Metadata<SystemPropertyActivation>> systemPropertyActivations = new LinkedList<>(); List<Metadata<ClassAvailableActivation>> classAvailableActivations = new LinkedList<>(); while (reader.hasNext()) { XMLEvent event = reader.nextEvent(); if (isEnd(event, EXCLUDE, SCANNING_URIS) || isEnd(event, INCLUDE, SCANNING_URIS)) { Filter filter; if (filterElement.getName().getNamespaceURI().equals(WELD_URI)) { filter = new WeldFilterImpl(name, systemPropertyActivations, classAvailableActivations, pattern); } else { filter = new FilterImpl(name, systemPropertyActivations, classAvailableActivations); } consumer.accept(new XmlMetadata<Filter>(filterElement.getName().toString(), filter, beansXml, filterElement.getLocation().getLineNumber())); return; } else if (event.isStartElement()) { StartElement element = (StartElement) event; if (isStartElement(element, IF_CLASS_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, false); } else if (isStartElement(element, IF_CLASS_NOT_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, true); } else if (isStartElement(element, IF_SYSTEM_PROPERTY, SCANNING_URIS)) { systemProperty(element, systemPropertyActivations::add); } } } } }
@Override public String toString() { StringBuilder builder = new StringBuilder(); if (this.getName() != null) { builder.append("name: ").append(getName()); } if (this.getPattern() != null) { builder.append("pattern: ").append(pattern); } if (this.getClassAvailableActivations() != null) { builder.append(getClassAvailableActivations()); } if (this.getSystemPropertyActivations() != null) { builder.append(getSystemPropertyActivations()); } return builder.toString(); } }
private void handleFilter(StartElement filterElement, XMLEventReader reader, Consumer<XmlMetadata<Filter>> consumer) throws XMLStreamException { String name = getAttribute(filterElement, NAME_ATTRIBUTE_NAME); String pattern = name != null ? null : getAttribute(filterElement, PATTERN_ATTRIBUTE_NAME); if (name != null || pattern != null) { List<Metadata<SystemPropertyActivation>> systemPropertyActivations = new LinkedList<>(); List<Metadata<ClassAvailableActivation>> classAvailableActivations = new LinkedList<>(); while (reader.hasNext()) { XMLEvent event = reader.nextEvent(); if (isEnd(event, EXCLUDE, SCANNING_URIS) || isEnd(event, INCLUDE, SCANNING_URIS)) { Filter filter; if (filterElement.getName().getNamespaceURI().equals(WELD_URI)) { filter = new WeldFilterImpl(name, systemPropertyActivations, classAvailableActivations, pattern); } else { filter = new FilterImpl(name, systemPropertyActivations, classAvailableActivations); } consumer.accept(new XmlMetadata<Filter>(filterElement.getName().toString(), filter, beansXml, filterElement.getLocation().getLineNumber())); return; } else if (event.isStartElement()) { StartElement element = (StartElement) event; if (isStartElement(element, IF_CLASS_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, false); } else if (isStartElement(element, IF_CLASS_NOT_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, true); } else if (isStartElement(element, IF_SYSTEM_PROPERTY, SCANNING_URIS)) { systemProperty(element, systemPropertyActivations::add); } } } } }
@Override public String toString() { StringBuilder builder = new StringBuilder(); if (this.getName() != null) { builder.append("name: ").append(getName()); } if (this.getPattern() != null) { builder.append("pattern: ").append(pattern); } if (this.getClassAvailableActivations() != null) { builder.append(getClassAvailableActivations()); } if (this.getSystemPropertyActivations() != null) { builder.append(getSystemPropertyActivations()); } return builder.toString(); } }
private void handleFilter(StartElement filterElement, XMLEventReader reader, Consumer<XmlMetadata<Filter>> consumer) throws XMLStreamException { String name = getAttribute(filterElement, NAME_ATTRIBUTE_NAME); String pattern = name != null ? null : getAttribute(filterElement, PATTERN_ATTRIBUTE_NAME); if (name != null || pattern != null) { List<Metadata<SystemPropertyActivation>> systemPropertyActivations = new LinkedList<>(); List<Metadata<ClassAvailableActivation>> classAvailableActivations = new LinkedList<>(); while (reader.hasNext()) { XMLEvent event = reader.nextEvent(); if (isEnd(event, EXCLUDE, SCANNING_URIS) || isEnd(event, INCLUDE, SCANNING_URIS)) { Filter filter; if (filterElement.getName().getNamespaceURI().equals(WELD_URI)) { filter = new WeldFilterImpl(name, systemPropertyActivations, classAvailableActivations, pattern); } else { filter = new FilterImpl(name, systemPropertyActivations, classAvailableActivations); } consumer.accept(new XmlMetadata<Filter>(filterElement.getName().toString(), filter, beansXml, filterElement.getLocation().getLineNumber())); return; } else if (event.isStartElement()) { StartElement element = (StartElement) event; if (isStartElement(element, IF_CLASS_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, false); } else if (isStartElement(element, IF_CLASS_NOT_AVAILABLE, SCANNING_URIS)) { classAvailable(element, classAvailableActivations::add, true); } else if (isStartElement(element, IF_SYSTEM_PROPERTY, SCANNING_URIS)) { systemProperty(element, systemPropertyActivations::add); } } } } }
@Override public String toString() { StringBuilder builder = new StringBuilder(); if (this.getName() != null) { builder.append("name: ").append(getName()); } if (this.getPattern() != null) { builder.append("pattern: ").append(pattern); } if (this.getClassAvailableActivations() != null) { builder.append(getClassAvailableActivations()); } if (this.getSystemPropertyActivations() != null) { builder.append(getSystemPropertyActivations()); } return builder.toString(); } }