org.jvnet.hk2.config.Dom.setChildren()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(8.4k)|赞(0)|评价(0)|浏览(126)

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

Dom.setChildren介绍

[英]Used by the parser to set a list of children.
[中]解析器用于设置子级列表。

代码示例

代码示例来源:origin: javaee/glassfish

/**
 * When a new Dom object is created, ensures that all @NotNull annotated
 * elements have a value.
 * 
 */
public void addDefaultChildren() {
  List<Dom.Child> children = new ArrayList<Dom.Child>();
  ensureConstraints(children);
  if (!children.isEmpty()) {
    setChildren(children);
  }
}

代码示例来源:origin: javaee/glassfish

/**
 * Copy constructor, used to get a deep copy of the passed instance
 * @param source the instance to copy
 */
public Dom(Dom source, Dom parent) {
  this(source.getHabitat(), source.document, parent, source.model);
  List<Child> newChildren = new ArrayList<Child>();
  for (Child child : source.children) {
    newChildren.add(child.deepCopy(this));
  }
  setChildren(newChildren);
  attributes.putAll(source.attributes);
}

代码示例来源:origin: javaee/glassfish

/* package */ void ensureConstraints(List<Child> children) {
  Set<String> nullElements = new HashSet<String>(model.getElementNames());
  for (Child child : children) {
    nullElements.remove(child.name);
  }
  for (String s : nullElements) {
    ConfigModel.Property p = model.getElement(s);
    for (String annotation : p.getAnnotations()) {
      if (annotation.equals(NotNull.class.getName())) {
        if (p instanceof ConfigModel.Node) {
          ConfigModel childModel = ((ConfigModel.Node) p).model;
          Dom child = document.make(getHabitat(), null, this, childModel);
          child.register();
          children.add(new Dom.NodeChild(s, child));
          // recursive call to ensure the children constraints are also respected
          List<Child> grandChildren = new ArrayList<Child>();
          child.ensureConstraints(grandChildren);
          if (!grandChildren.isEmpty()) {
            child.setChildren(grandChildren);
          }
          child.initializationCompleted();
        }
      }
    }
  }
}

代码示例来源:origin: javaee/glassfish

dom.setChildren(children);

代码示例来源:origin: org.glassfish.hk2/config

/**
 * When a new Dom object is created, ensures that all @NotNull annotated
 * elements have a value.
 * 
 */
public void addDefaultChildren() {
  List<Dom.Child> children = new ArrayList<Dom.Child>();
  ensureConstraints(children);
  if (!children.isEmpty()) {
    setChildren(children);
  }
}

代码示例来源:origin: org.glassfish.hk2/hk2-config

/**
 * When a new Dom object is created, ensures that all @NotNull annotated
 * elements have a value.
 * 
 */
public void addDefaultChildren() {
  List<Dom.Child> children = new ArrayList<Dom.Child>();
  ensureConstraints(children);
  if (!children.isEmpty()) {
    setChildren(children);
  }
}

代码示例来源:origin: com.sun.enterprise/config

/**
 * When a new Dom object is created, ensures that all @NotNull annotated
 * elements have a value.
 * 
 */
public void addDefaultChildren() {
  List<Dom.Child> children = new ArrayList<Dom.Child>();
  ensureConstraints(children);
  if (!children.isEmpty()) {
    setChildren(children);
  }
}

代码示例来源:origin: eclipse-ee4j/glassfish

/**
 * When a new Dom object is created, ensures that all @NotNull annotated
 * elements have a value.
 * 
 */
public void addDefaultChildren() {
  List<Dom.Child> children = new ArrayList<Dom.Child>();
  ensureConstraints(children);
  if (!children.isEmpty()) {
    setChildren(children);
  }
}

代码示例来源:origin: com.sun.enterprise/config

/**
 * Copy constructor, used to get a deep copy of the passed instance
 * @param source the instance to copy
 */
public Dom(Dom source, Dom parent) {
  this(source.habitat, source.document, parent, source.model);
  List<Child> newChildren = new ArrayList<Child>();
  for (Child child : source.children) {
    newChildren.add(child.deepCopy(this));
  }
  setChildren(newChildren);
  attributes.putAll(source.attributes);
}

代码示例来源:origin: org.glassfish.hk2/config

/**
 * Copy constructor, used to get a deep copy of the passed instance
 * @param source the instance to copy
 */
public Dom(Dom source, Dom parent) {
  this(source.habitat, source.document, parent, source.model);
  List<Child> newChildren = new ArrayList<Child>();
  for (Child child : source.children) {
    newChildren.add(child.deepCopy(this));
  }
  setChildren(newChildren);
  attributes.putAll(source.attributes);
}

代码示例来源:origin: org.glassfish.hk2/hk2-config

/**
 * Copy constructor, used to get a deep copy of the passed instance
 * @param source the instance to copy
 */
public Dom(Dom source, Dom parent) {
  this(source.getHabitat(), source.document, parent, source.model);
  List<Child> newChildren = new ArrayList<Child>();
  for (Child child : source.children) {
    newChildren.add(child.deepCopy(this));
  }
  setChildren(newChildren);
  attributes.putAll(source.attributes);
}

代码示例来源:origin: eclipse-ee4j/glassfish

/**
 * Copy constructor, used to get a deep copy of the passed instance
 * @param source the instance to copy
 */
public Dom(Dom source, Dom parent) {
  this(source.getHabitat(), source.document, parent, source.model);
  List<Child> newChildren = new ArrayList<Child>();
  for (Child child : source.children) {
    newChildren.add(child.deepCopy(this));
  }
  setChildren(newChildren);
  attributes.putAll(source.attributes);
}

代码示例来源:origin: com.sun.enterprise/config

/* package */ void ensureConstraints(List<Child> children) {
  Set<String> nullElements = new HashSet<String>(model.getElementNames());
  for (Child child : children) {
    nullElements.remove(child.name);
  }
  for (String s : nullElements) {
    ConfigModel.Property p = model.getElement(s);
    for (String annotation : p.getAnnotations()) {
      if (annotation.equals(NotNull.class.getName())) {
        if (p instanceof ConfigModel.Node) {
          ConfigModel childModel = ((ConfigModel.Node) p).model;
          Dom child = document.make(habitat, null, this, childModel);
          child.register();
          children.add(new Dom.NodeChild(s, child));
          // recursive call to ensure the children constraints are also respected
          List<Child> grandChildren = new ArrayList<Child>();
          child.ensureConstraints(grandChildren);
          if (!grandChildren.isEmpty()) {
            child.setChildren(grandChildren);
          }
          child.initializationCompleted();
        }
      }
    }
  }
}

代码示例来源:origin: org.glassfish.hk2/config

/* package */ void ensureConstraints(List<Child> children) {
  Set<String> nullElements = new HashSet<String>(model.getElementNames());
  for (Child child : children) {
    nullElements.remove(child.name);
  }
  for (String s : nullElements) {
    ConfigModel.Property p = model.getElement(s);
    for (String annotation : p.getAnnotations()) {
      if (annotation.equals(NotNull.class.getName())) {
        if (p instanceof ConfigModel.Node) {
          ConfigModel childModel = ((ConfigModel.Node) p).model;
          Dom child = document.make(habitat, null, this, childModel);
          child.register();
          children.add(new Dom.NodeChild(s, child));
          // recursive call to ensure the children constraints are also respected
          List<Child> grandChildren = new ArrayList<Child>();
          child.ensureConstraints(grandChildren);
          if (!grandChildren.isEmpty()) {
            child.setChildren(grandChildren);
          }
          child.initializationCompleted();
        }
      }
    }
  }
}

代码示例来源:origin: org.glassfish.hk2/hk2-config

/* package */ void ensureConstraints(List<Child> children) {
  Set<String> nullElements = new HashSet<String>(model.getElementNames());
  for (Child child : children) {
    nullElements.remove(child.name);
  }
  for (String s : nullElements) {
    ConfigModel.Property p = model.getElement(s);
    for (String annotation : p.getAnnotations()) {
      if (annotation.equals(NotNull.class.getName())) {
        if (p instanceof ConfigModel.Node) {
          ConfigModel childModel = ((ConfigModel.Node) p).model;
          Dom child = document.make(getHabitat(), null, this, childModel);
          child.register();
          children.add(new Dom.NodeChild(s, child));
          // recursive call to ensure the children constraints are also respected
          List<Child> grandChildren = new ArrayList<Child>();
          child.ensureConstraints(grandChildren);
          if (!grandChildren.isEmpty()) {
            child.setChildren(grandChildren);
          }
          child.initializationCompleted();
        }
      }
    }
  }
}

代码示例来源:origin: eclipse-ee4j/glassfish

/* package */ void ensureConstraints(List<Child> children) {
  Set<String> nullElements = new HashSet<String>(model.getElementNames());
  for (Child child : children) {
    nullElements.remove(child.name);
  }
  for (String s : nullElements) {
    ConfigModel.Property p = model.getElement(s);
    for (String annotation : p.getAnnotations()) {
      if (annotation.equals(NotNull.class.getName())) {
        if (p instanceof ConfigModel.Node) {
          ConfigModel childModel = ((ConfigModel.Node) p).model;
          Dom child = document.make(getHabitat(), null, this, childModel);
          child.register();
          children.add(new Dom.NodeChild(s, child));
          // recursive call to ensure the children constraints are also respected
          List<Child> grandChildren = new ArrayList<Child>();
          child.ensureConstraints(grandChildren);
          if (!grandChildren.isEmpty()) {
            child.setChildren(grandChildren);
          }
          child.initializationCompleted();
        }
      }
    }
  }
}

代码示例来源:origin: org.glassfish.hk2/config

dom.setChildren(children);

代码示例来源:origin: eclipse-ee4j/glassfish

dom.setChildren(children);

代码示例来源:origin: org.glassfish.hk2/hk2-config

dom.setChildren(children);

代码示例来源:origin: com.sun.enterprise/config

dom.setChildren(children);

相关文章