• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Node类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jboss.shrinkwrap.descriptor.spi.node.Node的典型用法代码示例。如果您正苦于以下问题:Java Node类的具体用法?Java Node怎么用?Java Node使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Node类属于org.jboss.shrinkwrap.descriptor.spi.node包,在下文中一共展示了Node类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initiateChameleon

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
private void initiateChameleon(SetupContainer setup) throws NoSuchFieldException, IllegalAccessException {
    ChameleonContainer container = (ChameleonContainer) setup.getContainer().getDeployableContainer();
    ContainerDefImpl containerDef = (ContainerDefImpl) setup.getContainer().getContainerConfiguration();
    Field containerNodeField = ContainerDefImpl.class.getDeclaredField("container");
    if (!containerNodeField.isAccessible()) {
        containerNodeField.setAccessible(true);
    }

    Node node = (Node) containerNodeField.get(containerDef);
    Map<String, String> properties = removeAndMerge(container, node, containerDef);
    if (container.isInitiated() && !properties.containsKey("chameleonTarget")) {
        return;
    }

    ChameleonConfiguration configuration = new ChameleonConfiguration();
    try {
        // Remove the Chameleon container properties from configuration
        setAndRemoveProperties(node, properties, configuration);
        configuration.validate();
    } catch (Exception e) {
        throw new RuntimeException("Could not configure Chameleon container " + setup.getContainerName(), e);
    }
    container.init(configuration, containerDef);
}
 
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:25,代码来源:InitiateContainer.java


示例2: removeAndMerge

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
private Map<String, String> removeAndMerge(ChameleonContainer container, Node node, ContainerDef containerDef) {
    Map<String, String> current = containerDef.getContainerProperties();
    if (!container.isInitiated() || !current.containsKey("chameleonTarget")) {
        return current;
    }

    Map<String, String> original = container.getOriginalContainerConfiguration();
    Map<String, String> currentConfigured = container.getCurrentContainerConfiguration();

    for (Map.Entry<String, String> currentConfiguredEntry : currentConfigured.entrySet()) {
        if (!original.containsKey(currentConfiguredEntry.getKey())) {
            node.getSingle("configuration").removeChild("[email protected]=" + currentConfiguredEntry.getKey());
        }
    }

    return containerDef.getContainerProperties();
}
 
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:18,代码来源:InitiateContainer.java


示例3: setAndRemoveProperties

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
private void setAndRemoveProperties(Node node, Map<String, String> properties, ChameleonConfiguration configuration)
    throws Exception {

    for (Method setter : configuration.getClass().getMethods()) {
        if ( // isSetter
            setter.getName().startsWith("set") &&
                setter.getReturnType().equals(Void.TYPE) &&
                setter.getParameterTypes().length == 1
            ) {
            String propertyName = toCamelCase(setter);
            if (properties.containsKey(propertyName)) {
                setter.invoke(configuration, properties.get(propertyName));
                node.getSingle("configuration").removeChild("[email protected]=" + propertyName);
            }
        }
    }
}
 
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:18,代码来源:InitiateContainer.java


示例4: ModuleAnalyzer

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
public ModuleAnalyzer(InputStream in) throws IOException {
    NodeImporter importer = new XmlDomNodeImporterImpl();
    Node node = importer.importAsNode(in, true);

    String rootName = node.getName();

    if (rootName.equals("module")) {
        this.module = new ModuleDescriptorImpl(null, node);
    }
    in.close();
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:12,代码来源:ModuleAnalyzer.java


示例5: getAllDisplayName

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
    * Returns all <code>display-name</code> elements
    * @return list of <code>display-name</code> 
    */
public List<String> getAllDisplayName()
   {
      List<String> result = new ArrayList<String>();
      List<Node> nodes = childNode.get("display-name");
      for (Node node : nodes)
      {
         result.add(node.getText());
      }
      return result;
   }
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:15,代码来源:FacesConfigRendererTypeImpl.java


示例6: getAllConfigProperty

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * Returns all <code>config-property</code> elements
 * @return list of <code>config-property</code> 
 */
public List<ConfigPropertyType<ConnectionDefinitionType<T>>> getAllConfigProperty()
{
   List<ConfigPropertyType<ConnectionDefinitionType<T>>> list = new ArrayList<ConfigPropertyType<ConnectionDefinitionType<T>>>();
   List<Node> nodeList = childNode.get("config-property");
   for(Node node: nodeList)
   {
      ConfigPropertyType<ConnectionDefinitionType<T>>  type = new ConfigPropertyTypeImpl<ConnectionDefinitionType<T>>(this, "config-property", childNode, node);
      list.add(type);
   }
   return list;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:16,代码来源:ConnectionDefinitionTypeImpl.java


示例7: getAllTransient

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * Returns all <code>transient</code> elements
 * @return list of <code>transient</code> 
 */
public List<Transient<EmbeddableAttributes<T>>> getAllTransient()
{
   List<Transient<EmbeddableAttributes<T>>> list = new ArrayList<Transient<EmbeddableAttributes<T>>>();
   List<Node> nodeList = childNode.get("transient");
   for(Node node: nodeList)
   {
      Transient<EmbeddableAttributes<T>>  type = new TransientImpl<EmbeddableAttributes<T>>(this, "transient", childNode, node);
      list.add(type);
   }
   return list;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:16,代码来源:EmbeddableAttributesImpl.java


示例8: getOrCreateEnvEntry

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * If not already created, a new <code>env-entry</code> element will be created and returned.
 * Otherwise, the first existing <code>env-entry</code> element will be returned.
 * @return the instance defined for the element <code>env-entry</code> 
 */
public EnvEntryType<WebAppDescriptor> getOrCreateEnvEntry()
{
   List<Node> nodeList = model.get("env-entry");
   if (nodeList != null &&  nodeList.size() > 0)
   {
      return new EnvEntryTypeImpl<WebAppDescriptor>(this, "env-entry", model, nodeList.get(0));
   }
   return createEnvEntry();
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:15,代码来源:WebAppDescriptorImpl.java


示例9: getAllEjbRef

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * Returns all <code>ejb-ref</code> elements
 * @return list of <code>ejb-ref</code> 
 */
public List<EjbRefType<WebAppType<T>>> getAllEjbRef()
{
   List<EjbRefType<WebAppType<T>>> list = new ArrayList<EjbRefType<WebAppType<T>>>();
   List<Node> nodeList = childNode.get("ejb-ref");
   for(Node node: nodeList)
   {
      EjbRefType<WebAppType<T>>  type = new EjbRefTypeImpl<WebAppType<T>>(this, "ejb-ref", childNode, node);
      list.add(type);
   }
   return list;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:16,代码来源:WebAppTypeImpl.java


示例10: getAllVariableResolver

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
    * Returns all <code>variable-resolver</code> elements
    * @return list of <code>variable-resolver</code> 
    */
public List<String> getAllVariableResolver()
   {
      List<String> result = new ArrayList<String>();
      List<Node> nodes = childNode.get("variable-resolver");
      for (Node node : nodes)
      {
         result.add(node.getText());
      }
      return result;
   }
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:15,代码来源:FacesConfigApplicationTypeImpl.java


示例11: getAllIcon

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * Returns all <code>icon</code> elements
 * @return list of <code>icon</code> 
 */
public List<IconType<FaceletTaglibTagComponentType<T>>> getAllIcon()
{
   List<IconType<FaceletTaglibTagComponentType<T>>> list = new ArrayList<IconType<FaceletTaglibTagComponentType<T>>>();
   List<Node> nodeList = childNode.get("icon");
   for(Node node: nodeList)
   {
      IconType<FaceletTaglibTagComponentType<T>>  type = new IconTypeImpl<FaceletTaglibTagComponentType<T>>(this, "icon", childNode, node);
      list.add(type);
   }
   return list;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:16,代码来源:FaceletTaglibTagComponentTypeImpl.java


示例12: getOrCreateIcon

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * If not already created, a new <code>icon</code> element will be created and returned.
 * Otherwise, the first existing <code>icon</code> element will be returned.
 * @return the instance defined for the element <code>icon</code> 
 */
public IconType<FacesConfigPropertyType<T>> getOrCreateIcon()
{
   List<Node> nodeList = childNode.get("icon");
   if (nodeList != null &&  nodeList.size() > 0)
   {
      return new IconTypeImpl<FacesConfigPropertyType<T>>(this, "icon", childNode, nodeList.get(0));
   }
   return createIcon();
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:15,代码来源:FacesConfigPropertyTypeImpl.java


示例13: getOrCreateFilter

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * If not already created, a new <code>filter</code> element will be created and returned.
 * Otherwise, the first existing <code>filter</code> element will be returned.
 * @return the instance defined for the element <code>filter</code> 
 */
public FilterType<WebFragmentDescriptor> getOrCreateFilter()
{
   List<Node> nodeList = model.get("filter");
   if (nodeList != null &&  nodeList.size() > 0)
   {
      return new FilterTypeImpl<WebFragmentDescriptor>(this, "filter", model, nodeList.get(0));
   }
   return createFilter();
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:15,代码来源:WebFragmentDescriptorImpl.java


示例14: getOrCreateIcon

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * If not already created, a new <code>icon</code> element will be created and returned.
 * Otherwise, the first existing <code>icon</code> element will be returned.
 * @return the instance defined for the element <code>icon</code> 
 */
public IconType<FacesConfigFacetType<T>> getOrCreateIcon()
{
   List<Node> nodeList = childNode.get("icon");
   if (nodeList != null &&  nodeList.size() > 0)
   {
      return new IconTypeImpl<FacesConfigFacetType<T>>(this, "icon", childNode, nodeList.get(0));
   }
   return createIcon();
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:15,代码来源:FacesConfigFacetTypeImpl.java


示例15: getOrCreateUniqueConstraint

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * If not already created, a new <code>unique-constraint</code> element will be created and returned.
 * Otherwise, the first existing <code>unique-constraint</code> element will be returned.
 * @return the instance defined for the element <code>unique-constraint</code> 
 */
public UniqueConstraint<SecondaryTable<T>> getOrCreateUniqueConstraint()
{
   List<Node> nodeList = childNode.get("unique-constraint");
   if (nodeList != null &&  nodeList.size() > 0)
   {
      return new UniqueConstraintImpl<SecondaryTable<T>>(this, "unique-constraint", childNode, nodeList.get(0));
   }
   return createUniqueConstraint();
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:15,代码来源:SecondaryTableImpl.java


示例16: getOrCreateLicense

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * If not already created, a new <code>license</code> element with the given value will be created.
 * Otherwise, the existing <code>license</code> element will be returned.
 * @return  a new or existing instance of <code>LicenseType<ConnectorType<T>></code> 
 */
public LicenseType<ConnectorType<T>> getOrCreateLicense()
{
   Node node = childNode.getOrCreate("license");
   LicenseType<ConnectorType<T>> license = new LicenseTypeImpl<ConnectorType<T>>(this, "license", childNode, node);
   return license;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:12,代码来源:ConnectorTypeImpl.java


示例17: getAllValidator

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * Returns all <code>validator</code> elements
 * @return list of <code>validator</code> 
 */
public List<FacesConfigValidatorType<WebFacesConfigDescriptor>> getAllValidator()
{
   List<FacesConfigValidatorType<WebFacesConfigDescriptor>> list = new ArrayList<FacesConfigValidatorType<WebFacesConfigDescriptor>>();
   List<Node> nodeList = model.get("validator");
   for(Node node: nodeList)
   {
      FacesConfigValidatorType<WebFacesConfigDescriptor>  type = new FacesConfigValidatorTypeImpl<WebFacesConfigDescriptor>(this, "validator", model, node);
      list.add(type);
   }
   return list;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:16,代码来源:WebFacesConfigDescriptorImpl.java


示例18: getAllUrlPattern

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
    * Returns all <code>url-pattern</code> elements
    * @return list of <code>url-pattern</code> 
    */
public List<String> getAllUrlPattern()
   {
      List<String> result = new ArrayList<String>();
      List<Node> nodes = childNode.get("url-pattern");
      for (Node node : nodes)
      {
         result.add(node.getText());
      }
      return result;
   }
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:15,代码来源:FilterMappingTypeImpl.java


示例19: getAllIcon

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * Returns all <code>icon</code> elements
 * @return list of <code>icon</code> 
 */
public List<IconType<FaceletTaglibType<T>>> getAllIcon()
{
   List<IconType<FaceletTaglibType<T>>> list = new ArrayList<IconType<FaceletTaglibType<T>>>();
   List<Node> nodeList = childNode.get("icon");
   for(Node node: nodeList)
   {
      IconType<FaceletTaglibType<T>>  type = new IconTypeImpl<FaceletTaglibType<T>>(this, "icon", childNode, node);
      list.add(type);
   }
   return list;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:16,代码来源:FaceletTaglibTypeImpl.java


示例20: getAllLocaleConfig

import org.jboss.shrinkwrap.descriptor.spi.node.Node; //导入依赖的package包/类
/**
 * Returns all <code>locale-config</code> elements
 * @return list of <code>locale-config</code> 
 */
public List<FacesConfigLocaleConfigType<FacesConfigApplicationType<T>>> getAllLocaleConfig()
{
   List<FacesConfigLocaleConfigType<FacesConfigApplicationType<T>>> list = new ArrayList<FacesConfigLocaleConfigType<FacesConfigApplicationType<T>>>();
   List<Node> nodeList = childNode.get("locale-config");
   for(Node node: nodeList)
   {
      FacesConfigLocaleConfigType<FacesConfigApplicationType<T>>  type = new FacesConfigLocaleConfigTypeImpl<FacesConfigApplicationType<T>>(this, "locale-config", childNode, node);
      list.add(type);
   }
   return list;
}
 
开发者ID:forge,项目名称:javaee-descriptors,代码行数:16,代码来源:FacesConfigApplicationTypeImpl.java



注:本文中的org.jboss.shrinkwrap.descriptor.spi.node.Node类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PPaintContext类代码示例发布时间:2022-05-22
下一篇:
Java FriendPickerFragment类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap