当前位置: 首页>>代码示例>>Java>>正文


Java ElementKind.CONTAINER_ELEMENT属性代码示例

本文整理汇总了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 //
  );
}
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators,代码行数:22,代码来源:NodeImpl.java

示例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);
}
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators,代码行数:18,代码来源:NodeImpl.java

示例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;
}
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators,代码行数:15,代码来源:PathImpl.java

示例4: getKind

@Override
public ElementKind getKind() {
    return ElementKind.CONTAINER_ELEMENT;
}
 
开发者ID:minijax,项目名称:minijax,代码行数:4,代码来源:MinijaxPath.java


注:本文中的javax.validation.ElementKind.CONTAINER_ELEMENT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。