Annotation Interface Implementation.TypeAdapter

Enclosing class:
Implementation

@Target(TYPE) @Retention(RUNTIME) @Scope public static @interface Implementation.TypeAdapter

A class annotated with Implementation.TypeAdapter will be automatically searched for and instantiated as a TypeAdapter by guice.

Example

@TypeAdapter(clazz = CustomType.class)
public class CustomTypeAdapter implements TypeAdapter<CustomType> {

    public Optional<CustomType> apply(String raw, GenericInteractionCreateEvent event) {
        return Optional.of(new CustomType(raw, event));
    }///
}