com.fasterxml.jackson.databind.introspect

## Class DefaultAccessorNamingStrategy.FirstCharBasedValidator

- java.lang.Object
- - com.fasterxml.jackson.databind.introspect.DefaultAccessorNamingStrategy.FirstCharBasedValidator

All Implemented Interfaces:
  DefaultAccessorNamingStrategy.BaseNameValidator

Enclosing class:
  DefaultAccessorNamingStrategy

    public static class DefaultAccessorNamingStrategy.FirstCharBasedValidator
    extends Object
    implements DefaultAccessorNamingStrategy.BaseNameValidator

Simple implementation of `DefaultAccessorNamingStrategy.BaseNameValidator` that checks the first character and nothing else.

Instances are to be constructed using method `forFirstNameRule(boolean, boolean)`.

### Constructor Summary

Constructors
`protected` `FirstCharBasedValidator(boolean allowLowerCaseFirstChar, boolean allowNonLetterFirstChar)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `accept(char firstChar, 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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FirstCharBasedValidator

    protected FirstCharBasedValidator(boolean allowLowerCaseFirstChar,
                                      boolean allowNonLetterFirstChar)

### Method Detail

#### forFirstNameRule

    public 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.

Parameters:
  `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()`.
Returns:
  Validator instance to use, if any; `null` to indicate no additional rules applied (case when both arguments are `true`)

#### accept

    public boolean accept(char firstChar,
                          String basename,
                          int offset)

Specified by:
  `accept` in interface `DefaultAccessorNamingStrategy.BaseNameValidator`