Interface ClassNamingStrategy

All Superinterfaces:
Supplier<@NotNull String>
All Known Implementing Classes:
ClassNamingStrategy.PaginatedClassNamingStrategy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ClassNamingStrategy extends Supplier<@NotNull String>
Object responsible for creating class names at runtime.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Class naming strategy appending numeric IDs to the base name.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull ClassNamingStrategy
    createPaginated(@NonNull String baseName)
    Creates new instance of paginated class naming strategy with the given base name.
    default @NotNull String
    get()
     
    @NotNull String
    Creates a name for a new class to be generated considering that it should not overlap any names of loaded classes.
  • Method Details

    • nextName

      @NotNull @NotNull String nextName()
      Creates a name for a new class to be generated considering that it should not overlap any names of loaded classes.
      Returns:
      name for a new class
    • get

      @NotNull default @NotNull String get()
      Specified by:
      get in interface Supplier<@NotNull String>
    • createPaginated

      @NotNull static @NotNull ClassNamingStrategy createPaginated(@NonNull @NonNull String baseName)
      Creates new instance of paginated class naming strategy with the given base name. This strategy will append numeric IDs to the given base name.
      Parameters:
      baseName - base name of the generated class names to which the ID should be appended
      Returns:
      created paginated class naming strategy