public static class DefaultAccessorNamingStrategy.FirstCharBasedValidator extends java.lang.Object implements DefaultAccessorNamingStrategy.BaseNameValidator
DefaultAccessorNamingStrategy.BaseNameValidator that checks the
first character and nothing else.
Instances are to be constructed using method
forFirstNameRule(boolean, boolean).
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(char firstChar,
java.lang.String basename,
int offset) |
static DefaultAccessorNamingStrategy.BaseNameValidator |
forFirstNameRule(boolean allowLowerCaseFirstChar,
boolean allowNonLetterFirstChar)
Factory method to use for getting an instance with specified first-character
restrictions, if any; or
null if no checking is needed. |
public static DefaultAccessorNamingStrategy.BaseNameValidator forFirstNameRule(boolean allowLowerCaseFirstChar, boolean allowNonLetterFirstChar)
null if no checking is needed.allowLowerCaseFirstChar - Whether base names that start with lower-case
letter (like "a" or "b") are accepted as valid or not:
consider difference between "setter-methods" setValue() and setvalue().allowNonLetterFirstChar - Whether base names that start with non-letter
character (like "_" or number 1) are accepted as valid or not:
consider difference between "setter-methods" setValue() and set_value().null to indicate no additional
rules applied (case when both arguments are false)public boolean accept(char firstChar,
java.lang.String basename,
int offset)
accept in interface DefaultAccessorNamingStrategy.BaseNameValidatorCopyright © 2010 - 2023 Adobe. All Rights Reserved