Interface FieldNameResolver

All Known Implementing Classes:
AccessorFieldNameResolver, GetterFieldNameResolver, IgnoredFieldNameResolver, IsAFieldNameResolver, MutatorFieldNameResolver, NullFieldNameResolver, PrimaryKeyFieldNameResolver, RelationalFieldNameResolver, SetterFieldNameResolver

public interface FieldNameResolver
An interface to resolve field names. Implementation should not transform (upper case, under score, camel case, etc...) the resolved name.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(Method method)
    Tells whether this field name resolver will be able to resolve a name from this method.
    resolve(Method method)
    Resolves the field name for the method
    boolean
    Tells whether the resolved method name from resolve(Method) allows for further transformations.
  • Method Details

    • accept

      boolean accept(Method method)
      Tells whether this field name resolver will be able to resolve a name from this method.
      Parameters:
      method - the method to figure out the field name for
      Returns:
      true if resolve(Method) will actually resolve the field name given the same method argument
    • resolve

      String resolve(Method method)
      Resolves the field name for the method
      Parameters:
      method - the method to resolve the field name for.
      Returns:
      the resolved field name. null is valid if no field name should be associated with this method.
      Throws:
      IllegalStateException - if this method is called while accept(Method) returns false
    • transform

      boolean transform()
      Tells whether the resolved method name from resolve(Method) allows for further transformations.
      Returns:
      true if further transformations are allowed