Enum Class DeclarationType

java.lang.Object
java.lang.Enum<DeclarationType>
ru.vyarus.dropwizard.guice.debug.report.guice.model.DeclarationType
All Implemented Interfaces:
Serializable, Comparable<DeclarationType>, Constable

public enum DeclarationType extends Enum<DeclarationType>
Guice binding declaration type. Note that type could be different, depending if it's element taken with SPI from guice module or binding from injector.
Since:
13.08.2019
  • Enum Constant Details

    • Scope

      public static final DeclarationType Scope
      Scope declaration (bindScope(...)). Appear only on module analysis.
    • Instance

      public static final DeclarationType Instance
      Instance binding (bing(Smth.class).toInstance(obj)).
    • ProviderInstance

      public static final DeclarationType ProviderInstance
      Bound provider instance (bind(Smth.class).toProvider(obj)).
    • LinkedKey

      public static final DeclarationType LinkedKey
      Linked binding declaration (bind(Smth.class).to(Other.class),, where Other may be already declared before as separate binding).
    • ProviderKey

      public static final DeclarationType ProviderKey
      Provider by key (bind(Smth.class).toProvider(DmthProv.class)).
    • Untargetted

      public static final DeclarationType Untargetted
      Untargetted binding (bind(Smth.class)). Appear only for module elements analysis. When queried binding from injector these bindings would be ConstructorBinding (and detected as Binding below).
    • Aop

      public static final DeclarationType Aop
      Aop interceptor registration (bindInterceptor(..)). Appear only for module elements analysis.
    • TypeListener

      public static final DeclarationType TypeListener
      TypeListener registration (bindListener(..)). Appear only for module elements analysis.
    • ProvisionListener

      public static final DeclarationType ProvisionListener
      ProvisionListener registration (bindListener(..)). Appear only for module elements analysis.
    • TypeConverter

      public static final DeclarationType TypeConverter
      TypeConverter registration (convertToTypes(,,)). Appear only for module elements analysis.
    • ProviderMethod

      public static final DeclarationType ProviderMethod
      Provider method in module (annotated with Provides).
    • Exposed

      public static final DeclarationType Exposed
      Exposed binding from private module. NOTE: only first level of exposed bindings are shown and so if private module use private module inside of it - second level exposures will not be visible in report! (logic: can't use - no need to see). Anyway, even on lower levels bindings will be marked as exposed (with a marker at the end).
    • FilterKey

      public static final DeclarationType FilterKey
      Http filter registration by class. This is not real binding, it could only be revealed with extensions target visitor. Real binding in injector is ignored (it's marked as internal).
    • FilterInstance

      public static final DeclarationType FilterInstance
      Http filter registration by instance. This is not real binding, it could only be revealed with extensions target visitor. Real binding in injector is ignored (it's marked as internal).
    • ServletKey

      public static final DeclarationType ServletKey
      Http servlet registration by class. This is not real binding, it could only be revealed with extensions target visitor. Real binding in injector is ignored (it's marked as internal).
    • ServletInstance

      public static final DeclarationType ServletInstance
      Http servlet registration by instance. This is not real binding, it could only be revealed with extensions target visitor. Real binding in injector is ignored (it's marked as internal).
    • Binding

      public static final DeclarationType Binding
      Used for all types, instantiated by guice (mostly right sides). Appear instead of Untargetted bindings for bindings requested from injector.
    • ConvertedConstant

      public static final DeclarationType ConvertedConstant
      Dynamic binding, constructed from bound string constant (using TypeConverter).
  • Method Details

    • values

      public static DeclarationType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DeclarationType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isRuntimeBinding

      public boolean isRuntimeBinding()
      Returns:
      true for actual bindings in injector, false for configuration time elements (scopes, listeners).
    • getType

      public Class<?> getType()
      Returns:
      binding type
    • detect

      public static DeclarationType detect(Class<? extends com.google.inject.spi.Element> type)
      Parameters:
      type - guice element
      Returns:
      detected type or null