Class CollectionDecoder<T extends java.util.Collection<?>>

    • Constructor Detail

      • CollectionDecoder

        public CollectionDecoder()
    • Method Detail

      • 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<T extends java.util.Collection<?>>
        Returns:
        Priority
      • decode

        public GResultOf<T> decode​(java.lang.String path,
                                   Tags tags,
                                   ConfigNode node,
                                   TypeCapture<?> type,
                                   DecoderContext decoderContext)
        Description copied from interface: Decoder
        Decode the current node. If the current node is a class or list we may need to decode sub nodes.
        Specified by:
        decode in interface Decoder<T extends java.util.Collection<?>>
        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.
        decoderContext - The context of the current decoder.
        Returns:
        GResultOf the current node with details of either success or failures.
      • arrayDecode

        protected abstract GResultOf<T> arrayDecode​(java.lang.String path,
                                                    Tags tags,
                                                    ConfigNode node,
                                                    TypeCapture<?> klass,
                                                    DecoderContext decoderContext)
        Decode an array values.
        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