Package space.arim.dazzleconf.engine
Interface TypeLiaison.Handshake
- Enclosing interface:
TypeLiaison
public static interface TypeLiaison.Handshake
Callback interface allowing
TypeLiaison.Agent to access certain resources-
Method Summary
Modifier and TypeMethodDescription<U> @NonNull ConfigurationDefinition<U> getConfiguration(@NonNull TypeToken<U> other) Gets another configuration.<U> @NonNull SerializeDeserialize<U> getOtherSerializer(@NonNull TypeToken<U> other) Gets another serializer.
-
Method Details
-
getOtherSerializer
@SideEffectFree <U> @NonNull SerializeDeserialize<U> getOtherSerializer(@NonNull TypeToken<U> other) Gets another serializer. This function allows serializers to "depend" on each other by using instances of other serializers.- Type Parameters:
U- the type requested- Parameters:
other- the type being requested- Returns:
- a serializer for it
- Throws:
DeveloperMistakeException- if no liaison handles the requested typeIllegalStateException- if a cyclic loop is detected with the other liaison
-
getConfiguration
@SideEffectFree <U> @NonNull ConfigurationDefinition<U> getConfiguration(@NonNull TypeToken<U> other) Gets another configuration. This function will use the settings from the parent configuration for purposes of defining, deserializing/serializing, and instantiating the child.- Type Parameters:
U- the type requested- Parameters:
other- the type whose definition is requested- Returns:
- a configuration which can be read or written
- Throws:
DeveloperMistakeException- if the type requested is improperly declared or has broken settingsIllegalStateException- if a cyclic loop is detected with the requested type
-