本文整理了Java中org.jvnet.hk2.config.Dom.ensureConstraints()
方法的一些代码示例,展示了Dom.ensureConstraints()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dom.ensureConstraints()
方法的具体详情如下:
包路径:org.jvnet.hk2.config.Dom
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!