Class ReflectionFinder.ReflectionFinderWithParameters<T,U extends ReflectionFinder.ReflectionFinderWithParameters<T,U>>

java.lang.Object
nl.pim16aap2.util.reflection.ReflectionFinder<T,U>
nl.pim16aap2.util.reflection.ReflectionFinder.ReflectionFinderWithParameters<T,U>
Type Parameters:
T - The type of objects to retrieve using reflection (e.g. Field, Method, etc.)
U - The type of finder being used to find the reflection object.
Direct Known Subclasses:
ConstructorFinder.ConstructorFinderInSource, MethodFinder.MethodFinderBase
Enclosing class:
ReflectionFinder<T,U extends ReflectionFinder<T,U>>

public abstract static class ReflectionFinder.ReflectionFinderWithParameters<T,U extends ReflectionFinder.ReflectionFinderWithParameters<T,U>> extends ReflectionFinder<T,U>
Represents a type of ReflectionFinder that also has a group of parameters.

This can be useful for things like methods.

  • Field Details

    • parameters

      @Nullable protected @Nullable ParameterGroup parameters
  • Constructor Details

  • Method Details

    • withoutParameters

      public U withoutParameters()
      Indicates that the target object being searched for takes exactly 0 parameters.

      If you want to ignore parameters altogether (default), use ignoreParameters() instead.

      Returns:
      The current finder instance.
    • ignoreParameters

      public U ignoreParameters()
      Indicates that the current finder should not take the parameters of the target object being searched for into account. This is the default behavior.
      Returns:
      The current finder instance.
    • withParameters

      public U withParameters(Class<?>... parameters)
      Indicates the set of required arguments this finder should consider when looking for the target object being searched for.

      If optional parameters are also required, withParameters(ParameterGroup) should be used instead.

      Parameters:
      parameters - The required parameters of the target object.
      Returns:
      The current finder instance.
    • withParameters

      public U withParameters(ParameterGroup parameters)
      Indicates the set of required arguments this finder should consider when looking for the target object being searched for.
      Parameters:
      parameters - The parameters of the target object.
      Returns:
      The current finder instance.
    • withParameters

      public U withParameters(ParameterGroup.Builder parameters)
      Indicates the set of required arguments this finder should consider when looking for the target object being searched for.
      Parameters:
      parameters - The parameters of the target object.
      Returns:
      The current finder instance.