Class VariableAssignmentParser


  • public final class VariableAssignmentParser
    extends MetaPatternParser
    Parses key value assignment statements like "foo=bar" but also supporting namespaces like "wicket:foo=bar". However the 'key' value returned will contain "wicket:foo". It does not separate namespace and name.
    Author:
    Jonathan Locke
    • Constructor Summary

      Constructors 
      Constructor Description
      VariableAssignmentParser​(java.lang.CharSequence input)
      Construct a variable assignment parser against a given input character sequence
      VariableAssignmentParser​(java.lang.CharSequence input, MetaPattern valuePattern)
      Construct a variable assignment parser against a given input character sequence
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getKey()
      Gets the key part (eg 'foo' in 'foo=bar').
      java.lang.String getValue()
      Gets the value part (eg 'bar' in 'foo=bar').
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VariableAssignmentParser

        public VariableAssignmentParser​(java.lang.CharSequence input)
        Construct a variable assignment parser against a given input character sequence
        Parameters:
        input - The input to parse
      • VariableAssignmentParser

        public VariableAssignmentParser​(java.lang.CharSequence input,
                                        MetaPattern valuePattern)
        Construct a variable assignment parser against a given input character sequence
        Parameters:
        input - The input to parse
        valuePattern - Value pattern
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Gets the key part (eg 'foo' in 'foo=bar'). The key will include the optional namespace (eg 'html:foo' in 'html:foo=bar').
        Returns:
        The key part
      • getValue

        public java.lang.String getValue()
        Gets the value part (eg 'bar' in 'foo=bar').
        Returns:
        The value part