Class PatternDecoder

  • All Implemented Interfaces:
    Decoder<java.util.regex.Pattern>

    public final class PatternDecoder
    extends LeafDecoder<java.util.regex.Pattern>
    Decode a Pattern.
    • Constructor Detail

      • PatternDecoder

        public PatternDecoder()
    • 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.util.regex.Pattern> leafDecode​(java.lang.String path,
                                                                ConfigNode node)
        Description copied from class: LeafDecoder
        Decode a leaf value.
        Specified by:
        leafDecode in class LeafDecoder<java.util.regex.Pattern>
        Parameters:
        path - the current path.
        node - the current node we are decoding.
        Returns:
        GResultOf the current node with details of either success or failures.