Package org.apache.bval.jsr303.util

Examples of org.apache.bval.jsr303.util.PathImpl.addNode()


   * @return the path in dot notation
   */
  public PathImpl getPropertyPath() {
    PathImpl currentPath = PathImpl.copy(path);
    if (getMetaProperty() != null) {
      currentPath.addNode(new NodeImpl(getMetaProperty().getName()));
    }
    return currentPath;
  }

  /**
 
View Full Code Here


        assertEquals(null, path.iterator().next().getName());
    }

    public void testToString() {
        PathImpl path = PathImpl.create(null);
        path.addNode(new NodeImpl("firstName"));
        assertEquals("firstName", path.toString());

        path = PathImpl.create(null);
        path.getLeafNode().setIndex(2);
        assertEquals("[2]", path.toString());
View Full Code Here

        assertEquals("firstName", path.toString());

        path = PathImpl.create(null);
        path.getLeafNode().setIndex(2);
        assertEquals("[2]", path.toString());
        path.addNode(new NodeImpl("firstName"));
        assertEquals("[2].firstName", path.toString());
    }

    public static Test suite() {
        return new TestSuite(PathImplTest.class);
View Full Code Here

            PathImpl path;
            if (propertyPath.isRootPath()) {
                path = PathImpl.create(name);
            } else {
                path = PathImpl.copy(propertyPath);
                path.addNode(new NodeImpl(name));
            }
            return new NodeBuilderDefinedContextImpl(parent, messageTemplate, path);
        }

        public ConstraintValidatorContext addConstraintViolation() {
View Full Code Here

   * @return the path in dot notation
   */
  public PathImpl getPropertyPath() {
    PathImpl currentPath = PathImpl.copy(path);
    if (getMetaProperty() != null) {
      currentPath.addNode(new NodeImpl(getMetaProperty().getName()));
    }
    return currentPath;
  }

  public MetaBean getRootMetaBean() {
View Full Code Here

        assertEquals(null, path.iterator().next().getName());
    }

    public void testToString() {
        PathImpl path = PathImpl.create(null);
        path.addNode(new NodeImpl("firstName"));
        assertEquals("firstName", path.toString());

        path = PathImpl.create(null);
        path.getLeafNode().setIndex(2);
        assertEquals("[2]", path.toString());
View Full Code Here

        assertEquals("firstName", path.toString());

        path = PathImpl.create(null);
        path.getLeafNode().setIndex(2);
        assertEquals("[2]", path.toString());
        path.addNode(new NodeImpl("firstName"));
        assertEquals("[2].firstName", path.toString());
    }

    public static Test suite() {
        return new TestSuite(PathImplTest.class);
View Full Code Here

            PathImpl path;
            if (propertyPath.isRootPath()) {
                path = PathImpl.create(name);
            } else {
                path = PathImpl.copy(propertyPath);
                path.addNode(new NodeImpl(name));
            }
            return new NodeBuilderDefinedContextImpl(parent, messageTemplate, path);
        }

        /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.