- java.lang.Object
-
- org.github.gestalt.config.decoder.LeafDecoder<java.nio.file.Path>
-
- org.github.gestalt.config.decoder.PathDecoder
-
- All Implemented Interfaces:
Decoder<java.nio.file.Path>
public final class PathDecoder extends LeafDecoder<java.nio.file.Path>
Decode a Path.
-
-
Constructor Summary
Constructors Constructor Description PathDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDecode(java.lang.String path, Tags tags, ConfigNode node, TypeCapture<?> type)true if this decoder matches the type capture.protected GResultOf<java.nio.file.Path>leafDecode(java.lang.String path, ConfigNode node)Decode a leaf value.java.lang.Stringname()Name of the encoder.Prioritypriority()Priority for the decoder.-
Methods inherited from class org.github.gestalt.config.decoder.LeafDecoder
decode, leafDecode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.github.gestalt.config.decoder.Decoder
applyConfig
-
-
-
-
Method Detail
-
priority
public Priority priority()
Description copied from interface:DecoderPriority for the decoder. Allows us to sort encoders when we have multiple matches.- Returns:
- Priority
-
name
public java.lang.String name()
Description copied from interface:DecoderName of the encoder.- Returns:
- encoder name
-
canDecode
public boolean canDecode(java.lang.String path, Tags tags, ConfigNode node, TypeCapture<?> type)Description copied from interface:Decodertrue if this decoder matches the type capture.- Parameters:
path- the current pathtags- the tags for the current requestnode- the current node we are decoding.type- the type of object we are decoding.- Returns:
- true if this decoder matches the type capture
-
leafDecode
protected GResultOf<java.nio.file.Path> leafDecode(java.lang.String path, ConfigNode node)
Description copied from class:LeafDecoderDecode a leaf value.- Specified by:
leafDecodein classLeafDecoder<java.nio.file.Path>- Parameters:
path- the current path.node- the current node we are decoding.- Returns:
- GResultOf the current node with details of either success or failures.
-
-