Class FileDecoder

  • All Implemented Interfaces:
    Decoder<java.io.File>

    public final class FileDecoder
    extends LeafDecoder<java.io.File>
    Decode a File.
    • Constructor Detail

      • FileDecoder

        public FileDecoder()
    • 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.
        Returns:
        Priority
      • name

        public java.lang.String name()
        Description copied from interface: Decoder
        Name of the encoder.
        Returns:
        encoder name
      • 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
      • leafDecode

        protected GResultOf<java.io.File> leafDecode​(java.lang.String path,
                                                     ConfigNode node)
        Description copied from class: LeafDecoder
        Decode a leaf value.
        Specified by:
        leafDecode in class LeafDecoder<java.io.File>
        Parameters:
        path - the current path.
        node - the current node we are decoding.
        Returns:
        GResultOf the current node with details of either success or failures.