Class ClassFinder


public class ClassFinder extends ReflectionFinder<Class<?>, ClassFinder>
Represents an implementation of ReflectionFinder for Class objects.
  • Constructor Details

    • ClassFinder

      public ClassFinder()
  • Method Details

    • withNames

      public ClassFinder withNames(String... names)
      Configures the set of names to look up.

      When more than 1 name is provided, the first class that can be found is returned.

      Parameters:
      names - The list of names the class might have.
      Returns:
      The current ClassFinder instance.
    • get

      public Class<?> get()
      Description copied from class: ReflectionFinder
      Retrieves the target reflection object(s) using the current configuration.

      This may throw an exception if the lookup hasn't been configured yet.

      Specified by:
      get in class ReflectionFinder<Class<?>, ClassFinder>
      Returns:
      The target reflection object(s) being searched for.
    • getNullable

      public @Nullable Class<?> getNullable()
      Description copied from class: ReflectionFinder
      Retrieves the target reflection object(s) using the current configuration.

      This may throw an exception if the lookup hasn't been configured yet.

      Specified by:
      getNullable in class ReflectionFinder<Class<?>, ClassFinder>
      Returns:
      The target reflection object(s) being searched for or null if no object(s) could be found.