Class LeafDecoder<T>

    • Constructor Detail

      • LeafDecoder

        public LeafDecoder()
    • Method Detail

      • decode

        public GResultOf<T> decode​(java.lang.String path,
                                   Tags tags,
                                   ConfigNode node,
                                   TypeCapture<?> type,
                                   DecoderContext decoderContext)
        Validates that the current node is a leaf and if it is call leafDecode.
        Specified by:
        decode in interface Decoder<T>
        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 information needed to decode an object.
        Returns:
        GResultOf the current node with details of either success or failures.
      • leafDecode

        protected GResultOf<T> leafDecode​(java.lang.String path,
                                          ConfigNode node,
                                          TypeCapture<?> type)
        Decode a leaf value.
        Parameters:
        path - the current path.
        node - the current node we are decoding.
        type - the type of object we are decoding.
        Returns:
        GResultOf the current node with details of either success or failures.
      • leafDecode

        protected abstract GResultOf<T> leafDecode​(java.lang.String path,
                                                   ConfigNode node)
        Decode a leaf value.
        Parameters:
        path - the current path.
        node - the current node we are decoding.
        Returns:
        GResultOf the current node with details of either success or failures.