All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.l4.commons.serialization.spi.SerializerResolver Maven / Gradle / Ivy

package se.l4.commons.serialization.spi;

import java.lang.annotation.Annotation;
import java.util.Collections;
import java.util.Set;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import se.l4.commons.serialization.Serializer;
import se.l4.commons.serialization.SerializerOrResolver;

/**
 * Resolver for a specific {@link Serializer}. This is used to support
 * generics and other semi-dynamic features.
 *
 * 

* Resolvers that use extra annotations to determine the serializer to use * should override {@link #getHints()} to return an array of the annotations * it uses. * * @author Andreas Holstenson * * @param */ public interface SerializerResolver extends SerializerOrResolver { /** * Attempt to find a suitable serializer. * * @param encounter * @return */ @Nullable Serializer find(@NonNull TypeEncounter encounter); /** * Get the hints this resolver uses. * * @return */ @NonNull default Set> getHints() { return Collections.emptySet(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy