Package dev.runabout
Interface RunaboutSerializer
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RunaboutSerializerGeneric serializer interface for Runabout. This interface should be implemented once per project, and the implementation should be a catch-all for any objects that need a custom serializer, but do not contain an instance serializer method in their class. To learn more about how to implement an instance serializer, seeToRunabout. The implementation should return null if the serializer cannot create a valid RunaboutInput for the given object. For common types, consumers of the API can rely on the default serializer. SeeDefaultSerializerfor details on which types are serialized out of the box. The implementation should be registered as a service in the META-INF/services/dev.runabout.RunaboutSerializer file.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static RunaboutSerializergetSerializer()RunaboutInputtoRunaboutGeneric(java.lang.Object object)Converts an object to a RunaboutInput.
-
-
-
Method Detail
-
getSerializer
static RunaboutSerializer getSerializer()
-
toRunaboutGeneric
RunaboutInput toRunaboutGeneric(java.lang.Object object)
Converts an object to a RunaboutInput.- Parameters:
object- The object to serialize.- Returns:
- A RunaboutInput containing a valid Java statement that can be used to recreate the object.
-
-