Class SequencedCollectionDecoder

  • All Implemented Interfaces:
    Decoder<java.util.List<?>>

    public final class SequencedCollectionDecoder
    extends CollectionDecoder<java.util.List<?>>
    Decode a Sequenced list type.
    • Constructor Detail

      • SequencedCollectionDecoder

        public SequencedCollectionDecoder()
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: Decoder
        Name of the encoder.
        Returns:
        encoder name
      • priority

        public Priority priority()
        Description copied from interface: Decoder
        Priority for the decoder. Allows us to sort encoders when we have multiple matches.
        Specified by:
        priority in interface Decoder<java.util.List<?>>
        Overrides:
        priority in class CollectionDecoder<java.util.List<?>>
        Returns:
        Priority
      • canDecode

        public boolean canDecode​(java.lang.String path,
                                 Tags tags,
                                 ConfigNode node,
                                 TypeCapture<?> type)
        Description copied from interface: Decoder
        true if this decoder matches the type capture.
        Parameters:
        path - the current path
        tags - the tags for the current request
        node - 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: CollectionDecoder
        Decode an array values.
        Specified by:
        arrayDecode in class CollectionDecoder<java.util.List<?>>
        Parameters:
        path - Current path we are decoding
        tags - Current tags for the request
        node - current node we are decoding
        klass - class to decode into
        decoderContext - The context of the current decoder.
        Returns:
        GResultOf array built from the config node