We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be nice to have the SerializationHintsPredicates in RuntimeHintsPredicates as we have for reflections, resource and proxies.
SerializationHintsPredicates
RuntimeHintsPredicates
reflections
resource
proxies
I've created one myself for now:
public class SerializationHintsPredicates { public TypeHintPredicate onType(TypeReference typeReference) { Assert.notNull(typeReference, "'typeReference' should not be null"); return new TypeHintPredicate(typeReference); } public TypeHintPredicate onType(Class<?> type) { Assert.notNull(type, "'type' should not be null"); return new TypeHintPredicate(TypeReference.of(type)); } public static class TypeHintPredicate implements Predicate<RuntimeHints> { private final TypeReference type; TypeHintPredicate(TypeReference type) { this.type = type; } @Override public boolean test(RuntimeHints hints) { return hints.serialization().javaSerialization().anyMatch((hint) -> hint.getType().equals(this.type)); } } }
The text was updated successfully, but these errors were encountered:
ee6a4e7
Good catch @marcusdacoregio, thanks!
Sorry, something went wrong.
snicoll
No branches or pull requests
It would be nice to have the
SerializationHintsPredicates
inRuntimeHintsPredicates
as we have forreflections
,resource
andproxies
.I've created one myself for now:
The text was updated successfully, but these errors were encountered: