Class ParameterInjector.ConstantInjector<C,T>

java.lang.Object
org.incendo.cloud.injection.ParameterInjector.ConstantInjector<C,T>
All Implemented Interfaces:
ParameterInjector<C,T>
Enclosing interface:
ParameterInjector<C,T>

public static final class ParameterInjector.ConstantInjector<C,T> extends Object implements ParameterInjector<C,T>
  • Method Details

    • create

      public @NonNull T create(@NonNull CommandContext<C> context, @NonNull AnnotationAccessor annotationAccessor)
      Description copied from interface: ParameterInjector
      Attempts to create a value that should then be injected into the Command annotated method.

      If the injector cannot (or shouldn't) create a value, it is free to return null.

      Specified by:
      create in interface ParameterInjector<C,T>
      Parameters:
      context - command context that is requesting the injection
      annotationAccessor - annotation accessor proxying the method and parameter which the value is being injected into
      Returns:
      the value if it could be created, else null in which case no value will be injected by this particular injector
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object