本文整理汇总了Java中javax.validation.ElementKind.CONTAINER_ELEMENT属性的典型用法代码示例。如果您正苦于以下问题:Java ElementKind.CONTAINER_ELEMENT属性的具体用法?Java ElementKind.CONTAINER_ELEMENT怎么用?Java ElementKind.CONTAINER_ELEMENT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.validation.ElementKind
的用法示例。
在下文中一共展示了ElementKind.CONTAINER_ELEMENT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createContainerElementNode
/**
* create container element node.
*
* @param name name of the node
* @param parent parent node
* @return new node implementation
*/
public static NodeImpl createContainerElementNode(final String name, final NodeImpl parent) {
return new NodeImpl( //
name, //
parent, //
false, //
null, //
null, //
ElementKind.CONTAINER_ELEMENT, //
EMPTY_CLASS_ARRAY, //
null, //
null, //
null, //
null //
);
}
示例2: as
@SuppressWarnings("unchecked")
@Override
public <T extends Path.Node> T as(final Class<T> nodeType) throws ClassCastException { // NOPMD
if (this.kind == ElementKind.BEAN && nodeType == BeanNode.class
|| this.kind == ElementKind.CONSTRUCTOR && nodeType == ConstructorNode.class
|| this.kind == ElementKind.CROSS_PARAMETER && nodeType == CrossParameterNode.class
|| this.kind == ElementKind.METHOD && nodeType == MethodNode.class
|| this.kind == ElementKind.PARAMETER && nodeType == ParameterNode.class
|| this.kind == ElementKind.PROPERTY && (nodeType == PropertyNode.class
|| nodeType == org.hibernate.validator.path.PropertyNode.class)
|| this.kind == ElementKind.RETURN_VALUE && nodeType == ReturnValueNode.class
|| this.kind == ElementKind.CONTAINER_ELEMENT && (nodeType == ContainerElementNode.class
|| nodeType == org.hibernate.validator.path.ContainerElementNode.class)) {
return (T) this;
}
throw LOG.getUnableToNarrowNodeTypeException(this.getClass(), this.kind, nodeType);
}
示例3: setLeafNodeValueIfRequired
public NodeImpl setLeafNodeValueIfRequired(final Object value) {
// The value is only exposed for property and container element nodes
if (this.currentLeafNode.getKind() == ElementKind.PROPERTY
|| this.currentLeafNode.getKind() == ElementKind.CONTAINER_ELEMENT) {
this.requiresWriteableNodeList();
this.currentLeafNode = NodeImpl.setPropertyValue(this.currentLeafNode, value);
this.nodeList.set(this.nodeList.size() - 1, this.currentLeafNode);
// the property value is not part of the NodeImpl hashCode so we don't need to reset the
// PathImpl hashCode
}
return this.currentLeafNode;
}
示例4: getKind
@Override
public ElementKind getKind() {
return ElementKind.CONTAINER_ELEMENT;
}