Package juuxel.ripple.processor
Interface NameProcessorCodec<P extends NameProcessor<P>>
- Type Parameters:
P
- the input/outputNameProcessor
type
- All Known Implementing Classes:
FilteredProcessor.Codec
,RenameRule.Codec
public interface NameProcessorCodec<P extends NameProcessor<P>>
A codec that handles JSON reading and writing of
NameProcessor
instances.
Codecs are loaded as ServiceLoader
services for deserialisation purposes.
- Since:
- 0.2.0
-
Method Summary
Modifier and Type Method Description Identifier
getId()
Gets the unique identifier of this codec.java.util.stream.Stream<P>
read(blue.endless.jankson.JsonObject json)
Reads name processors from a JSON object.void
write(P processor, blue.endless.jankson.JsonObject json)
Writes a name processor to a JSON object.
-
Method Details
-
getId
Identifier getId()Gets the unique identifier of this codec.- Returns:
- this codec's ID
-
read
Reads name processors from a JSON object.- Parameters:
json
- the JSON object- Returns:
- a stream of the read processors
-
write
Writes a name processor to a JSON object.- Parameters:
processor
- the name processorjson
- the JSON object
-