Package org.apache.wicket.util.parse.metapattern.parsers

Examples of org.apache.wicket.util.parse.metapattern.parsers.TagNameParser.matcher()


    // Get the length of the tagtext
    final int tagTextLength = tagText.length();

    // If we match tagname pattern
    final TagNameParser tagnameParser = new TagNameParser(tagText);
    if (tagnameParser.matcher().lookingAt())
    {
      // Extract the tag from the pattern matcher
      tag.name = tagnameParser.getName();
      tag.namespace = tagnameParser.getNamespace();
View Full Code Here


      tag.name = tagnameParser.getName();
      tag.namespace = tagnameParser.getNamespace();

      // Are we at the end? Then there are no attributes, so we just
      // return the tag
      int pos = tagnameParser.matcher().end(0);
      if (pos == tagTextLength)
      {
        return true;
      }
View Full Code Here

    // Get the length of the tagtext
    final int tagTextLength = tagText.length();

    // If we match tagname pattern
    final TagNameParser tagnameParser = new TagNameParser(tagText);
    if (tagnameParser.matcher().lookingAt())
    {
      // Extract the tag from the pattern matcher
      tag.name = tagnameParser.getName();
      tag.namespace = tagnameParser.getNamespace();
View Full Code Here

      tag.name = tagnameParser.getName();
      tag.namespace = tagnameParser.getNamespace();

      // Are we at the end? Then there are no attributes, so we just
      // return the tag
      int pos = tagnameParser.matcher().end(0);
      if (pos == tagTextLength)
      {
        return true;
      }
View Full Code Here

    // Get the length of the tagtext
    final int tagTextLength = tagText.length();

    // If we match tagname pattern
    final TagNameParser tagnameParser = new TagNameParser(tagText);
    if (tagnameParser.matcher().lookingAt())
    {
      // Extract the tag from the pattern matcher
      tag.name = tagnameParser.getName();
      tag.namespace = tagnameParser.getNamespace();
View Full Code Here

      tag.name = tagnameParser.getName();
      tag.namespace = tagnameParser.getNamespace();

      // Are we at the end? Then there are no attributes, so we just
      // return the tag
      int pos = tagnameParser.matcher().end(0);
      if (pos == tagTextLength)
      {
        return true;
      }
View Full Code Here

   */
  public void testTagParser()
  {
    String tag = "name";
    TagNameParser parser = new TagNameParser(tag);
    assertEquals(true, parser.matcher().matches());
    assertEquals("name", parser.getName());
    assertNull(parser.getNamespace());

    tag = "namespace:name";
    parser = new TagNameParser(tag);
View Full Code Here

    assertEquals("name", parser.getName());
    assertNull(parser.getNamespace());

    tag = "namespace:name";
    parser = new TagNameParser(tag);
    assertEquals(true, parser.matcher().matches());
    assertEquals("name", parser.getName());
    assertEquals("namespace", parser.getNamespace());

    tag = "namespace:";
    parser = new TagNameParser(tag);
View Full Code Here

    assertEquals("name", parser.getName());
    assertEquals("namespace", parser.getNamespace());

    tag = "namespace:";
    parser = new TagNameParser(tag);
    assertEquals(false, parser.matcher().matches());

    tag = ":names";
    parser = new TagNameParser(tag);
    assertEquals(false, parser.matcher().matches());
  }
View Full Code Here

    parser = new TagNameParser(tag);
    assertEquals(false, parser.matcher().matches());

    tag = ":names";
    parser = new TagNameParser(tag);
    assertEquals(false, parser.matcher().matches());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.