@Test public void testIsSimpleJavaIdentifier() throws Exception { assertThat(TransformerFactory.isSimpleJavaIdentifier("SomeTransformer"), is(true)); assertThat(TransformerFactory.isSimpleJavaIdentifier( "some.package.SomeTransformer"), is(false)); }
static boolean isSimpleJavaIdentifier(final String className) { assert className.length() > 0: "className must be non-empty"; if (!Character.isJavaIdentifierStart(className.charAt(0))) { return false; } for (int i = 1, max = className.length(); i < max; i++) { if (!Character.isJavaIdentifierPart(className.charAt(i))) { return false; } } return true; }
TransformerFactory { static boolean isSimpleJavaIdentifier(final String className) { assert className.length() > 0: "className must be non-empty"; if (!Character.isJavaIdentifierStart(className.charAt(0))) { return false; } for (int i = 1, max = className.length(); i < max; i++) { if (!Character.isJavaIdentifierPart(className.charAt(i))) { return false; } } return true; } }
TransformerFactory { static boolean isSimpleJavaIdentifier(final String className) { assert className.length() > 0: "className must be non-empty"; if (!Character.isJavaIdentifierStart(className.charAt(0))) { return false; } for (int i = 1, max = className.length(); i < max; i++) { if (!Character.isJavaIdentifierPart(className.charAt(i))) { return false; } } return true; }  }
TransformerFactory { static boolean isSimpleJavaIdentifier(final String className) { assert className.length() > 0: "className must be non-empty"; if (!Character.isJavaIdentifierStart(className.charAt(0))) { return false; } for (int i = 1, max = className.length(); i < max; i++) { if (!Character.isJavaIdentifierPart(className.charAt(i))) { return false; } } return true; }  static Transformer<?, ?> getTransformer(String code, 
      String moduleSpec, Properties properties); }
TransformerFactory { static boolean isSimpleJavaIdentifier(final String className) { assert className.length() > 0: "className must be non-empty"; if (!Character.isJavaIdentifierStart(className.charAt(0))) { return false; } for (int i = 1, max = className.length(); i < max; i++) { if (!Character.isJavaIdentifierPart(className.charAt(i))) { return false; } } return true; }  static Transformer<?, ?> getTransformer(String code, 
      String moduleSpec, Properties properties);  }