Module org.github.gestalt.core
Class StringConstructorDecoder
- java.lang.Object
-
- org.github.gestalt.config.decoder.StringConstructorDecoder
-
-
Constructor Summary
Constructors Constructor Description StringConstructorDecoder()
-
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.GResultOf<java.lang.Object>decode(java.lang.String path, Tags tags, ConfigNode node, TypeCapture<?> type, DecoderContext decoderContext)Decode the current node.java.lang.Stringname()Name of the encoder.Prioritypriority()Priority for the decoder.-
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.
-
name
public java.lang.String name()
Description copied from interface:DecoderName of the encoder.
-
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.
-
decode
public GResultOf<java.lang.Object> decode(java.lang.String path, Tags tags, ConfigNode node, TypeCapture<?> type, DecoderContext decoderContext)
Decode the current node. If the current node is a class or list we may need to decode sub nodes.- Specified by:
decodein interfaceDecoder<java.lang.Object>- 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.decoderContext- The context of the current decoder.- Returns:
- GResultOf the current node with details of either success or failures.
-
-