-
- All Known Implementing Classes:
DecoderRegistry
public interface DecoderServiceContains all decoders and functionality interact and decode a node.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDecoders(java.util.List<Decoder<?>> decoder)Add decoders to the service.<T> GResultOf<T>decodeNode(java.lang.String path, Tags tags, java.lang.String configNode, TypeCapture<T> klass, DecoderContext decoderContext)Decode a node and return the GResultOf with the results.<T> GResultOf<T>decodeNode(java.lang.String path, Tags tags, ConfigNode configNode, TypeCapture<T> klass, DecoderContext decoderContext)Decode a node and return the GResultOf with the results.java.util.List<Decoder<?>>getDecoders()Get a list of decoders supported.GResultOf<ConfigNode>getNextNode(java.lang.String path, int nextIndex, ConfigNode configNode)Gets the next node from a config node, in a path for a int index.GResultOf<ConfigNode>getNextNode(java.lang.String path, java.lang.String nextPath, ConfigNode configNode)Gets the next node from a config node, in a path for a string.java.util.List<PathMapper>getPathMappers()Get all path mappers the decoder service has registered.voidsetDecoders(java.util.List<Decoder<?>> decoders)Set a list of decoders, replaces any existing decoders.voidsetPathMappers(java.util.List<PathMapper> pathMappers)Set all path mappers the decoder service can use.
-
-
-
Method Detail
-
getDecoders
java.util.List<Decoder<?>> getDecoders()
Get a list of decoders supported.- Returns:
- ist of decoders supported
-
setDecoders
void setDecoders(java.util.List<Decoder<?>> decoders)
Set a list of decoders, replaces any existing decoders.- Parameters:
decoders- list of decoders
-
decodeNode
<T> GResultOf<T> decodeNode(java.lang.String path, Tags tags, java.lang.String configNode, TypeCapture<T> klass, DecoderContext decoderContext)
Decode a node and return the GResultOf with the results.- Type Parameters:
T- The generic type of the node we are decoding.- Parameters:
path- Current path we are decoding, used for loggingtags- the tags for the current requestconfigNode- the current node we are decodingklass- the TypeCapture of the node we are decodingdecoderContext- The context for the decoder- Returns:
- GResultOf the code we are decoding.
-
decodeNode
<T> GResultOf<T> decodeNode(java.lang.String path, Tags tags, ConfigNode configNode, TypeCapture<T> klass, DecoderContext decoderContext)
Decode a node and return the GResultOf with the results.- Type Parameters:
T- The generic type of the node we are decoding.- Parameters:
path- Current path we are decoding, used for loggingtags- the tags for the current requestconfigNode- the current node we are decodingklass- the TypeCapture of the node we are decodingdecoderContext- The context for the decoder- Returns:
- GResultOf the code we are decoding.
-
addDecoders
void addDecoders(java.util.List<Decoder<?>> decoder)
Add decoders to the service.- Parameters:
decoder- list of decoders
-
getPathMappers
java.util.List<PathMapper> getPathMappers()
Get all path mappers the decoder service has registered.- Returns:
- PathMapper
-
setPathMappers
void setPathMappers(java.util.List<PathMapper> pathMappers)
Set all path mappers the decoder service can use.- Parameters:
pathMappers- path mappers to replace the current ones
-
getNextNode
GResultOf<ConfigNode> getNextNode(java.lang.String path, java.lang.String nextPath, ConfigNode configNode)
Gets the next node from a config node, in a path for a string.- Parameters:
path- Current path we are decoding, used for loggingnextPath- path of the next nodeconfigNode- current config node- Returns:
- the next config node.
-
getNextNode
GResultOf<ConfigNode> getNextNode(java.lang.String path, int nextIndex, ConfigNode configNode)
Gets the next node from a config node, in a path for a int index.- Parameters:
path- Current path we are decoding, used for loggingnextIndex- path of the next nodeconfigNode- current config node- Returns:
- the next config node.
-
-