org.jboss.as.controller.parsing.Element.forName()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(11.0k)|赞(0)|评价(0)|浏览(246)

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

Element.forName介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

  1. private void parseIndexing(XMLExtendedStreamReader reader, PathAddress cacheAddress, Map<PathAddress, ModelNode> operations) throws XMLStreamException {
  2. ModelNode operation = operations.get(cacheAddress);
  3. for (int i = 0; i < reader.getAttributeCount(); i++) {
  4. XMLAttribute attribute = XMLAttribute.forName(reader.getAttributeLocalName(i));
  5. switch (attribute) {
  6. case INDEX: {
  7. readAttribute(reader, i, operation, CacheResourceDefinition.DeprecatedAttribute.INDEXING);
  8. break;
  9. }
  10. default: {
  11. throw ParseUtils.unexpectedAttribute(reader, i);
  12. }
  13. }
  14. }
  15. while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
  16. Element element = Element.forName(reader.getLocalName());
  17. switch (element) {
  18. case PROPERTY: {
  19. ParseUtils.requireSingleAttribute(reader, XMLAttribute.NAME.getLocalName());
  20. readElement(reader, operation, CacheResourceDefinition.DeprecatedAttribute.INDEXING_PROPERTIES);
  21. break;
  22. }
  23. default: {
  24. throw ParseUtils.unexpectedElement(reader);
  25. }
  26. }
  27. }
  28. }

代码示例来源:origin: org.wildfly.core/wildfly-domain-management

  1. private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
  2. requireNamespace(reader, expectedNs);
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, expectedNs);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case JSON_FORMATTER:{
  8. parseFileAuditLogFormatter(reader, address, list);
  9. break;
  10. }
  11. default:
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }

代码示例来源:origin: org.wildfly.core/wildfly-domain-management

  1. private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
  2. requireNamespace(reader, expectedNs);
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, expectedNs);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case JSON_FORMATTER:{
  8. parseFileAuditLogFormatter(reader, address, list);
  9. break;
  10. }
  11. default:
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }

代码示例来源:origin: wildfly/wildfly-core

  1. private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
  2. requireNamespace(reader, expectedNs);
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, expectedNs);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case JSON_FORMATTER:{
  8. parseFileAuditLogFormatter(reader, address, list);
  9. break;
  10. }
  11. default:
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }

代码示例来源:origin: org.wildfly.core/wildfly-domain-management

  1. private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
  2. requireNamespace(reader, expectedNs);
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, expectedNs);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case JSON_FORMATTER:{
  8. parseFileAuditLogFormatter(reader, address, list);
  9. break;
  10. }
  11. default:
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }

代码示例来源:origin: wildfly/wildfly-core

  1. private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
  2. requireNamespace(reader, expectedNs);
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, expectedNs);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case JSON_FORMATTER:{
  8. parseFileAuditLogFormatter(reader, address, list);
  9. break;
  10. }
  11. default:
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }

代码示例来源:origin: wildfly/wildfly-core

  1. private void parseAuditLogFormatters(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list) throws XMLStreamException {
  2. requireNamespace(reader, expectedNs);
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, expectedNs);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case JSON_FORMATTER:{
  8. parseFileAuditLogFormatter(reader, address, list);
  9. break;
  10. }
  11. default:
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }

代码示例来源:origin: org.wildfly.core/wildfly-server

  1. void parsePaths(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs,
  2. final List<ModelNode> list, final boolean requirePath) throws XMLStreamException {
  3. final Set<String> pathNames = new HashSet<String>();
  4. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  5. final Element element = Element.forName(reader.getLocalName());
  6. requireNamespace(reader, expectedNs);
  7. switch (element) {
  8. case PATH: {
  9. parsePath(reader, address, list, requirePath, pathNames);
  10. break;
  11. }
  12. default: {
  13. throw unexpectedElement(reader);
  14. }
  15. }
  16. }
  17. }

代码示例来源:origin: org.wildfly.core/wildfly-domain-management

  1. private void parseOutboundConnections(final XMLExtendedStreamReader reader, final ModelNode address,
  2. final List<ModelNode> list) throws XMLStreamException {
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, namespace);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case LDAP: {
  8. parseLdapConnection(reader, address, list);
  9. break;
  10. }
  11. default: {
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }
  16. }

代码示例来源:origin: org.wildfly.core/wildfly-domain-management

  1. private void parseSecurityRealms(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
  2. throws XMLStreamException {
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, namespace);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case SECURITY_REALM: {
  8. parseSecurityRealm(reader, address, list);
  9. break;
  10. }
  11. default: {
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }
  16. }

代码示例来源:origin: org.jboss.as/jboss-as-host-controller

  1. private void parseServers_1_0(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list)
  2. throws XMLStreamException {
  3. // Handle elements
  4. final Set<String> names = new HashSet<String>();
  5. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  6. requireNamespace(reader, expectedNs);
  7. final Element element = Element.forName(reader.getLocalName());
  8. switch (element) {
  9. case SERVER:
  10. parseServer(reader, address, expectedNs, list, names);
  11. break;
  12. default:
  13. throw unexpectedElement(reader);
  14. }
  15. }
  16. }

代码示例来源:origin: org.wildfly.core/wildfly-domain-management

  1. private void parseOutboundConnections(final XMLExtendedStreamReader reader, final ModelNode address,
  2. final List<ModelNode> list) throws XMLStreamException {
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, namespace);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case LDAP: {
  8. parseLdapConnection(reader, address, list);
  9. break;
  10. }
  11. default: {
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }
  16. }

代码示例来源:origin: wildfly/wildfly-core

  1. private void parseOutboundConnections(final XMLExtendedStreamReader reader, final ModelNode address,
  2. final List<ModelNode> list) throws XMLStreamException {
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, namespace);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case LDAP: {
  8. parseLdapConnection(reader, address, list);
  9. break;
  10. }
  11. default: {
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }
  16. }

代码示例来源:origin: org.wildfly.core/wildfly-domain-management

  1. private void parseSecurityRealms(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
  2. throws XMLStreamException {
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, namespace);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case SECURITY_REALM: {
  8. parseSecurityRealm(reader, address, list);
  9. break;
  10. }
  11. default: {
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }
  16. }

代码示例来源:origin: org.wildfly.core/wildfly-host-controller

  1. private void parseServers_1_0(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
  2. throws XMLStreamException {
  3. // Handle elements
  4. final Set<String> names = new HashSet<String>();
  5. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  6. requireNamespace(reader, namespace);
  7. final Element element = Element.forName(reader.getLocalName());
  8. switch (element) {
  9. case SERVER:
  10. parseServer(reader, address, list, names);
  11. break;
  12. default:
  13. throw unexpectedElement(reader);
  14. }
  15. }
  16. }

代码示例来源:origin: wildfly/wildfly-core

  1. private void parseSecurityRealms(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
  2. throws XMLStreamException {
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, namespace);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case SECURITY_REALM: {
  8. parseSecurityRealm(reader, address, list);
  9. break;
  10. }
  11. default: {
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }
  16. }

代码示例来源:origin: wildfly/wildfly-core

  1. private void parseSecurityRealms(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
  2. throws XMLStreamException {
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, namespace);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case SECURITY_REALM: {
  8. parseSecurityRealm(reader, address, list);
  9. break;
  10. }
  11. default: {
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }
  16. }

代码示例来源:origin: org.jboss.as/jboss-as-server

  1. protected void parsePaths(final XMLExtendedStreamReader reader, final ModelNode address, final Namespace expectedNs, final List<ModelNode> list,
  2. final boolean requirePath) throws XMLStreamException {
  3. final Set<String> pathNames = new HashSet<String>();
  4. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  5. final Element element = Element.forName(reader.getLocalName());
  6. requireNamespace(reader, expectedNs);
  7. switch (element) {
  8. case PATH: {
  9. parsePath(reader, address, list, requirePath, pathNames);
  10. break;
  11. }
  12. default: {
  13. throw unexpectedElement(reader);
  14. }
  15. }
  16. }
  17. }

代码示例来源:origin: wildfly/wildfly-core

  1. private void parseOutboundConnections(final XMLExtendedStreamReader reader, final ModelNode address,
  2. final List<ModelNode> list) throws XMLStreamException {
  3. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  4. requireNamespace(reader, namespace);
  5. final Element element = Element.forName(reader.getLocalName());
  6. switch (element) {
  7. case LDAP: {
  8. parseLdapConnection(reader, address, list);
  9. break;
  10. }
  11. default: {
  12. throw unexpectedElement(reader);
  13. }
  14. }
  15. }
  16. }

代码示例来源:origin: wildfly/wildfly-core

  1. private void parseServers_1_0(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
  2. throws XMLStreamException {
  3. // Handle elements
  4. final Set<String> names = new HashSet<String>();
  5. while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
  6. requireNamespace(reader, namespace);
  7. final Element element = Element.forName(reader.getLocalName());
  8. switch (element) {
  9. case SERVER:
  10. parseServer(reader, address, list, names);
  11. break;
  12. default:
  13. throw unexpectedElement(reader);
  14. }
  15. }
  16. }

相关文章