Class Sources

java.lang.Object
org.eclipse.sisu.inject.Sources

public final class Sources extends Object
Utility methods for dealing with annotated sources.
  • Constructor Details

    • Sources

      private Sources()
  • Method Details

    • hide

      public static Hidden hide()
      Hides a new binding source from the bean locator.
      Returns:
      Hidden source
    • hide

      public static Hidden hide(Object source)
      Hides the given binding source from the bean locator.
      Parameters:
      source - The source
      Returns:
      Hidden source
    • describe

      public static Description describe(String value)
      Describes a new binding source with the given description.
      Parameters:
      value - The description
      Returns:
      Described source
    • describe

      public static Description describe(Object source, String value)
      Describes the given binding source with the given description.
      Parameters:
      source - The source
      value - The description
      Returns:
      Described source
    • prioritize

      public static Priority prioritize(int value)
      Prioritizes a new binding source with the given priority.
      Parameters:
      value - The priority
      Returns:
      Prioritized source
    • prioritize

      public static Priority prioritize(Object source, int value)
      Prioritizes the given binding source with the given priority.
      Parameters:
      source - The source
      value - The priority
      Returns:
      Prioritized source
    • getAnnotation

      public static <T extends Annotation> T getAnnotation(com.google.inject.Binding<?> binding, Class<T> annotationType)
      Searches the binding's source and implementation for an annotation of the given type.
      Parameters:
      binding - The binding
      annotationType - The annotation type
      Returns:
      Annotation instance; null if it doesn't exist