org.jboss.shrinkwrap.descriptor.spi.node.Node.get()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(9.8k)|赞(0)|评价(0)|浏览(208)

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

Node.get介绍

[英]Get all children with a specific name.
[中]让所有孩子都有一个特定的名字。

代码示例

代码示例来源:origin: org.jboss.arquillian.config/arquillian-config-impl-base

  1. @Override
  2. public List<String> getDependencies() {
  3. List<String> dependencies = new ArrayList<String>();
  4. if (container.getSingle("dependencies") != null) {
  5. for (Node dep : container.getSingle("dependencies").get("dependency")) {
  6. dependencies.add(dep.getText());
  7. }
  8. }
  9. return dependencies;
  10. }

代码示例来源:origin: org.jboss.forge/forge-javaee-impl

  1. @Override
  2. public List<String> getConstraintMappings()
  3. {
  4. List<String> mappings = new ArrayList<String>();
  5. for (Node oneNode : model.get("constraint-mapping"))
  6. {
  7. mappings.add(oneNode.getText());
  8. }
  9. return mappings;
  10. }

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

  1. @Override
  2. public List<GroupDef> getGroups() {
  3. List<GroupDef> groups = new ArrayList<GroupDef>();
  4. for (Node group : model.get("group")) {
  5. groups.add(new GroupDefImpl(getDescriptorName(), model, group));
  6. }
  7. return groups;
  8. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>icon</code> element will be created and returned.
  3. * Otherwise, the first existing <code>icon</code> element will be returned.
  4. * @return the instance defined for the element <code>icon</code>
  5. */
  6. public IconType<FaceletTaglibTagAttributeType<T>> getOrCreateIcon()
  7. {
  8. List<Node> nodeList = childNode.get("icon");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new IconTypeImpl<FaceletTaglibTagAttributeType<T>>(this, "icon", childNode, nodeList.get(0));
  12. }
  13. return createIcon();
  14. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>property</code> element will be created and returned.
  3. * Otherwise, the first existing <code>property</code> element will be returned.
  4. * @return the instance defined for the element <code>property</code>
  5. */
  6. public FacesConfigPropertyType<FacesConfigValidatorType<T>> getOrCreateProperty()
  7. {
  8. List<Node> nodeList = childNode.get("property");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new FacesConfigPropertyTypeImpl<FacesConfigValidatorType<T>>(this, "property", childNode, nodeList.get(0));
  12. }
  13. return createProperty();
  14. }

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

  1. @Override
  2. public List<ExtensionDef> getExtensions() {
  3. List<ExtensionDef> extensions = new ArrayList<ExtensionDef>();
  4. for (Node extension : model.get("extension")) {
  5. extensions.add(new ExtensionDefImpl(getDescriptorName(), model, extension));
  6. }
  7. return extensions;
  8. }

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

  1. @Override
  2. public List<String> getDependencies() {
  3. List<String> dependencies = new ArrayList<String>();
  4. if (container.getSingle("dependencies") != null) {
  5. for (Node dep : container.getSingle("dependencies").get("dependency")) {
  6. dependencies.add(dep.getText());
  7. }
  8. }
  9. return dependencies;
  10. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>icon</code> element will be created and returned.
  3. * Otherwise, the first existing <code>icon</code> element will be returned.
  4. * @return the instance defined for the element <code>icon</code>
  5. */
  6. public IconType<SessionBeanType<T>> getOrCreateIcon()
  7. {
  8. List<Node> nodeList = childNode.get("icon");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new IconTypeImpl<SessionBeanType<T>>(this, "icon", childNode, nodeList.get(0));
  12. }
  13. return createIcon();
  14. }

代码示例来源:origin: org.jboss.arquillian.config/arquillian-config-impl-base

  1. @Override
  2. public List<ExtensionDef> getExtensions() {
  3. List<ExtensionDef> extensions = new ArrayList<ExtensionDef>();
  4. for (Node extension : model.get("extension")) {
  5. extensions.add(new ExtensionDefImpl(getDescriptorName(), model, extension));
  6. }
  7. return extensions;
  8. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>pre-destroy</code> element will be created and returned.
  3. * Otherwise, the first existing <code>pre-destroy</code> element will be returned.
  4. * @return the instance defined for the element <code>pre-destroy</code>
  5. */
  6. public LifecycleCallbackType<SessionBeanType<T>> getOrCreatePreDestroy()
  7. {
  8. List<Node> nodeList = childNode.get("pre-destroy");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new LifecycleCallbackTypeImpl<SessionBeanType<T>>(this, "pre-destroy", childNode, nodeList.get(0));
  12. }
  13. return createPreDestroy();
  14. }

代码示例来源:origin: org.jboss.arquillian.config/arquillian-config-impl-base

  1. @Override
  2. public List<GroupDef> getGroups() {
  3. List<GroupDef> groups = new ArrayList<GroupDef>();
  4. for (Node group : model.get("group")) {
  5. groups.add(new GroupDefImpl(getDescriptorName(), model, group));
  6. }
  7. return groups;
  8. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>service-ref</code> element will be created and returned.
  3. * Otherwise, the first existing <code>service-ref</code> element will be returned.
  4. * @return the instance defined for the element <code>service-ref</code>
  5. */
  6. public ServiceRefType<SessionBeanType<T>> getOrCreateServiceRef()
  7. {
  8. List<Node> nodeList = childNode.get("service-ref");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new ServiceRefTypeImpl<SessionBeanType<T>>(this, "service-ref", childNode, nodeList.get(0));
  12. }
  13. return createServiceRef();
  14. }

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

  1. @Override
  2. public List<ContainerDef> getContainers() {
  3. List<ContainerDef> containers = new ArrayList<ContainerDef>();
  4. for (Node container : model.get("container")) {
  5. containers.add(new ContainerDefImpl(getDescriptorName(), model, container));
  6. }
  7. return containers;
  8. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>injection-target</code> element will be created and returned.
  3. * Otherwise, the first existing <code>injection-target</code> element will be returned.
  4. * @return the instance defined for the element <code>injection-target</code>
  5. */
  6. public InjectionTargetType<ResourceEnvRefType<T>> getOrCreateInjectionTarget()
  7. {
  8. List<Node> nodeList = childNode.get("injection-target");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new InjectionTargetTypeImpl<ResourceEnvRefType<T>>(this, "injection-target", childNode, nodeList.get(0));
  12. }
  13. return createInjectionTarget();
  14. }

代码示例来源:origin: org.jboss.arquillian.config/arquillian-config-impl-base

  1. @Override
  2. public List<ContainerDef> getContainers() {
  3. List<ContainerDef> containers = new ArrayList<ContainerDef>();
  4. for (Node container : model.get("container")) {
  5. containers.add(new ContainerDefImpl(getDescriptorName(), model, container));
  6. }
  7. return containers;
  8. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>init-param</code> element will be created and returned.
  3. * Otherwise, the first existing <code>init-param</code> element will be returned.
  4. * @return the instance defined for the element <code>init-param</code>
  5. */
  6. public ParamValueType<ValidatorType<T>> getOrCreateInitParam()
  7. {
  8. List<Node> nodeList = childNode.get("init-param");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new ParamValueTypeImpl<ValidatorType<T>>(this, "init-param", childNode, nodeList.get(0));
  12. }
  13. return createInitParam();
  14. }

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

  1. @Override
  2. public List<ProtocolDef> getProtocols() {
  3. List<ProtocolDef> protocols = new ArrayList<ProtocolDef>();
  4. for (Node proto : container.get("protocol")) {
  5. protocols.add(new ProtocolDefImpl(getDescriptorName(), getRootNode(), container, proto));
  6. }
  7. return protocols;
  8. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>ordering</code> element will be created and returned.
  3. * Otherwise, the first existing <code>ordering</code> element will be returned.
  4. * @return the instance defined for the element <code>ordering</code>
  5. */
  6. public FacesConfigOrderingType<WebFacesConfigDescriptor> getOrCreateOrdering()
  7. {
  8. List<Node> nodeList = model.get("ordering");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new FacesConfigOrderingTypeImpl<WebFacesConfigDescriptor>(this, "ordering", model, nodeList.get(0));
  12. }
  13. return createOrdering();
  14. }

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

  1. @Override
  2. public List<ContainerDef> getGroupContainers() {
  3. List<ContainerDef> containers = new ArrayList<ContainerDef>();
  4. for (Node container : group.get("container")) {
  5. containers.add(new GroupContainerDefImpl(getDescriptorName(), getRootNode(), group, container));
  6. }
  7. return containers;
  8. }

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-impl-javaee

  1. /**
  2. * If not already created, a new <code>icon</code> element will be created and returned.
  3. * Otherwise, the first existing <code>icon</code> element will be returned.
  4. * @return the instance defined for the element <code>icon</code>
  5. */
  6. public IconType<FaceletTaglibTagValidatorType<T>> getOrCreateIcon()
  7. {
  8. List<Node> nodeList = childNode.get("icon");
  9. if (nodeList != null && nodeList.size() > 0)
  10. {
  11. return new IconTypeImpl<FaceletTaglibTagValidatorType<T>>(this, "icon", childNode, nodeList.get(0));
  12. }
  13. return createIcon();
  14. }

相关文章