@Test public void testValidPackageNames() { PackageValidator.validate("foo"); PackageValidator.validate("foo.bar"); PackageValidator.validate("foo.bar.baz"); PackageValidator.validate("ab.c.d"); PackageValidator.validate("a1.b2.c3"); }
public static void validate(String name) { Preconditions.checkArgument( VALID_PACKAGE.matcher(name).matches(), "Conjure package names must match pattern %s: %s", VALID_PACKAGE.pattern(), name); }
PackageValidator { public static void validate(String name) { Preconditions.checkArgument( VALID_PACKAGE.matcher(name).matches(), "Conjure package names must match pattern %s: %s", VALID_PACKAGE.pattern(), name); } }
PackageValidator { public static void validate(String name) { Preconditions.checkArgument( VALID_PACKAGE.matcher(name).matches(), "Conjure package names must match pattern %s: %s", VALID_PACKAGE.pattern(), name); } private  PackageValidator(); }
PackageValidator { public static void validate(String name) { Preconditions.checkArgument( VALID_PACKAGE.matcher(name).matches(), "Conjure package names must match pattern %s: %s", VALID_PACKAGE.pattern(), name); } private  PackageValidator(); static List<String> components(String name); static void validate(String name); static String conjurePackage(Iterable<String> components); }
PackageValidator { public static void validate(String name) { Preconditions.checkArgument( VALID_PACKAGE.matcher(name).matches(), "Conjure package names must match pattern %s: %s", VALID_PACKAGE.pattern(), name); } private  PackageValidator(); static List<String> components(String name); static void validate(String name); static String conjurePackage(Iterable<String> components); static final String PRIMITIVE; }