/** * Returns a {@code Path} instance representing the path described by the * given string. To create a root node the empty string should be passed. * * @param propertyPath the path as string representation. * * @return a {@code Path} instance representing the path described by the * given string. * * @throws IllegalArgumentException in case {@code property == null} or * {@code property} cannot be parsed. */ public static PathImpl createPathFromString(String propertyPath) { Contracts.assertNotNull( propertyPath, MESSAGES.propertyPathCannotBeNull() ); if ( propertyPath.length() == 0 ) { return createRootPath(); } return parseProperty( propertyPath ); }
/** * Returns a {@code Path} instance representing the path described by the * given string. To create a root node the empty string should be passed. * * @param propertyPath the path as string representation. * * @return a {@code Path} instance representing the path described by the * given string. * * @throws IllegalArgumentException in case {@code property == null} or * {@code property} cannot be parsed. */ public static PathImpl createPathFromString(String propertyPath) { Contracts.assertNotNull( propertyPath, MESSAGES.propertyPathCannotBeNull() ); if ( propertyPath.length() == 0 ) { return createRootPath(); } return parseProperty( propertyPath ); }