@Test public void testValidNames() { final String[] validNames = {"abc", "def", "_-", "123j .", "64MycharacterNameIsValidNameShouldPassTest1234567891011213141516"}; for (final String name : validNames) { final JvmNameRule rule = new JvmNameRule(name); assertTrue(rule.isValid()); rule.validate(); } }
@Override public boolean isValid() { return super.isValid() && name.length() <= MAX_LENGTH; }
JvmNameRule extends ValidNameRule { @Override public boolean isValid() { return super.isValid() && name.length() <= MAX_LENGTH; } }
JvmNameRule extends ValidNameRule { @Override public boolean isValid() { return super.isValid() && name.length() <= MAX_LENGTH; } JvmNameRule(final String theName); }
JvmNameRule extends ValidNameRule { @Override public boolean isValid() { return super.isValid() && name.length() <= MAX_LENGTH; } JvmNameRule(final String theName); @Override boolean isValid(); }
JvmNameRule extends ValidNameRule { @Override public boolean isValid() { return super.isValid() && name.length() <= MAX_LENGTH; } JvmNameRule(final String theName); @Override boolean isValid(); final int MAX_LENGTH; }