Module org.github.gestalt.core
Class SequencedCollectionDecoder
- java.lang.Object
-
- org.github.gestalt.config.decoder.CollectionDecoder<java.util.List<?>>
-
- org.github.gestalt.config.decoder.SequencedCollectionDecoder
-
- All Implemented Interfaces:
Decoder<java.util.List<?>>
public final class SequencedCollectionDecoder extends CollectionDecoder<java.util.List<?>>
Decode a Sequenced list type.
-
-
Constructor Summary
Constructors Constructor Description SequencedCollectionDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GResultOf<java.util.List<?>>arrayDecode(java.lang.String path, Tags tags, ConfigNode node, TypeCapture<?> klass, DecoderContext decoderContext)Decode an array values.booleancanDecode(java.lang.String path, Tags tags, ConfigNode node, TypeCapture<?> type)true if this decoder matches the type capture.java.lang.Stringname()Name of the encoder.Prioritypriority()Priority for the decoder.-
Methods inherited from class org.github.gestalt.config.decoder.CollectionDecoder
decode
-
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
-
name
public java.lang.String name()
Description copied from interface:DecoderName of the encoder.- Returns:
- encoder name
-
priority
public Priority priority()
Description copied from interface:DecoderPriority for the decoder. Allows us to sort encoders when we have multiple matches.- Specified by:
priorityin interfaceDecoder<java.util.List<?>>- Overrides:
priorityin classCollectionDecoder<java.util.List<?>>- Returns:
- Priority
-
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
-
arrayDecode
protected GResultOf<java.util.List<?>> arrayDecode(java.lang.String path, Tags tags, ConfigNode node, TypeCapture<?> klass, DecoderContext decoderContext)
Description copied from class:CollectionDecoderDecode an array values.- Specified by:
arrayDecodein classCollectionDecoder<java.util.List<?>>- Parameters:
path- Current path we are decodingtags- Current tags for the requestnode- current node we are decodingklass- class to decode intodecoderContext- The context of the current decoder.- Returns:
- GResultOf array built from the config node
-
-