Enum DeclarationType
- java.lang.Object
-
- java.lang.Enum<DeclarationType>
-
- ru.vyarus.dropwizard.guice.debug.report.guice.model.DeclarationType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DeclarationType>
public enum DeclarationType extends java.lang.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 Summary
Enum Constants Enum Constant Description AopAop interceptor registration (bindInterceptor(..)).BindingUsed for all types, instantiated by guice (mostly right sides).ConvertedConstantDynamic binding, constructed from bound string constant (usingTypeConverter).ExposedExposed binding from private module.FilterInstanceHttp filter registration by instance.FilterKeyHttp filter registration by class.InstanceInstance binding (bing(Smth.class).toInstance(obj)).LinkedKeyLinked binding declaration (bind(Smth.class).to(Other.class),, where Other may be already declared before as separate binding).ProviderInstanceBound provider instance (bind(Smth.class).toProvider(obj)).ProviderKeyProvider by key (bind(Smth.class).toProvider(DmthProv.class)).ProviderMethodProvider method in module (annotated withProvides).ProvisionListenerProvisionListenerregistration (bindListener(..)).ScopeScope declaration (bindScope(...)).ServletInstanceHttp servlet registration by instance.ServletKeyHttp servlet registration by class.TypeConverterTypeConverterregistration (convertToTypes(,,)).TypeListenerTypeListenerregistration (bindListener(..)).UntargettedUntargetted binding (bind(Smth.class)).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DeclarationTypedetect(java.lang.Class<? extends com.google.inject.spi.Element> type)java.lang.Class<?>getType()booleanisRuntimeBinding()static DeclarationTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DeclarationType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 beConstructorBinding(and detected asBindingbelow).
-
Aop
public static final DeclarationType Aop
Aop interceptor registration (bindInterceptor(..)). Appear only for module elements analysis.
-
TypeListener
public static final DeclarationType TypeListener
TypeListenerregistration (bindListener(..)). Appear only for module elements analysis.
-
ProvisionListener
public static final DeclarationType ProvisionListener
ProvisionListenerregistration (bindListener(..)). Appear only for module elements analysis.
-
TypeConverter
public static final DeclarationType TypeConverter
TypeConverterregistration (convertToTypes(,,)). Appear only for module elements analysis.
-
ProviderMethod
public static final DeclarationType ProviderMethod
Provider method in module (annotated withProvides).
-
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 ofUntargettedbindings for bindings requested from injector.
-
ConvertedConstant
public static final DeclarationType ConvertedConstant
Dynamic binding, constructed from bound string constant (usingTypeConverter).
-
-
Method Detail
-
values
public static DeclarationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DeclarationType c : DeclarationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DeclarationType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.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 java.lang.Class<?> getType()
- Returns:
- binding type
-
detect
public static DeclarationType detect(java.lang.Class<? extends com.google.inject.spi.Element> type)
- Parameters:
type- guice element- Returns:
- detected type or null
-
-