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

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

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

Dom.ensureConstraints介绍

暂无

代码示例

代码示例来源: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

/* 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

children = new ArrayList<Dom.Child>();
dom.ensureConstraints(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: 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: 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: 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/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: 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: 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

children = new ArrayList<Dom.Child>();
dom.ensureConstraints(children);

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

children = new ArrayList<Dom.Child>();
dom.ensureConstraints(children);

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

children = new ArrayList<Dom.Child>();
dom.ensureConstraints(children);

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

children = new ArrayList<Dom.Child>();
dom.ensureConstraints(children);

相关文章

微信公众号

最新文章

更多