Interface ValidationInformation

All Known Implementing Classes:
ValidationInformationImpl

public interface ValidationInformation
This object contains information about the validation point. The values available may vary depending on the type of operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    This method attempts to return the StackTraceElement of the code calling the HK2 method that caused this validation to occur
    The candidate descriptor for this operation
    On a LOOKUP operation the Filter that was used in the lookup operation.
    On a LOOKUP operation if the lookup is being performed due to an injection point (as opposed to a lookup via the API) then this method will return a non-null Injectee that is the injection point that would be injected into
    The operation that is to be performed, one of BIND - The candidate descriptor is being added to the system UNBIND - The candidate descriptor is being removed from the system LOOKUP - The candidate descriptor is being looked up
  • Method Details

    • getOperation

      Operation getOperation()
      The operation that is to be performed, one of
      • BIND - The candidate descriptor is being added to the system
      • UNBIND - The candidate descriptor is being removed from the system
      • LOOKUP - The candidate descriptor is being looked up
      Returns:
      The operation being performed
    • getCandidate

      ActiveDescriptor<?> getCandidate()
      The candidate descriptor for this operation
      Returns:
      The candidate descriptor for the operation being performed
    • getInjectee

      Injectee getInjectee()
      On a LOOKUP operation if the lookup is being performed due to an injection point (as opposed to a lookup via the API) then this method will return a non-null Injectee that is the injection point that would be injected into
      Returns:
      The injection point being injected into on a LOOKUP operation
    • getFilter

      Filter getFilter()
      On a LOOKUP operation the Filter that was used in the lookup operation. This may give more information about what exactly was being looked up by the caller
      Returns:
      The filter used in the lookup operation
    • getCaller

      StackTraceElement getCaller()
      This method attempts to return the StackTraceElement of the code calling the HK2 method that caused this validation to occur

      This method may not work properly if called outside of the call frame of the Validator.validate(ValidationInformation) method

      Returns:
      The caller of the HK2 API that caused this validation to occur, or null if the caller could not be determined