Package space.arim.dazzleconf.engine
Interface TypeLiaison.DefaultInit<V>
- Type Parameters:
V- the type of the configuration object
- Enclosing interface:
TypeLiaison
public static interface TypeLiaison.DefaultInit<V>
Provides relevant resources related to default value creation
-
Method Summary
Modifier and TypeMethodDescription@NonNull TypeToken<?> The interface type where the method is located, after computing inheritance.@NonNull Stringlabel()The label for the entry, typically the method name@NonNull AnnotatedElementGets method level annotations for the entry being initialized@Nullable DefaultValues<V> Extracts default values from the default method if one exists.
-
Method Details
-
enclosingType
@NonNull TypeToken<?> enclosingType()The interface type where the method is located, after computing inheritance.In particular, this is the configuration interface passed to the library. This is not the source code location, which means that if the configuration type extends one or more parent interfaces, the main interface will always be returned (and never a parent interface).
- Returns:
- the interface type
-
label
@NonNull String label()The label for the entry, typically the method name- Returns:
- the label
-
methodAnnotations
@NonNull AnnotatedElement methodAnnotations()Gets method level annotations for the entry being initialized- Returns:
- the method level annotations
-
methodDefault
@Nullable DefaultValues<V> methodDefault()Extracts default values from the default method if one exists.Returns
nullif there is no default method implementation. If the default method returnsOptionaland the optional was empty, this method also returnsnull.- Returns:
- the default values from the default method
- Throws:
DeveloperMistakeException- if the default method is implemented incorrectly. Liaison implementations should not catch this exception but simply let it propagate
-