java.util.regex
Class Pattern.GroupHead

java.lang.Object
  extended byjava.util.regex.Pattern.Node
      extended byjava.util.regex.Pattern.GroupHead
Enclosing class:
Pattern

static final class Pattern.GroupHead
extends Pattern.Node

The GroupHead saves the location where the group begins in the locals and restores them when the match is done. The matchRef is used when a reference to this group is accessed later in the expression. The locals will have a negative value in them to indicate that we do not want to unset the group if the reference doesn't match.


Field Summary
(package private)  int localIndex
           
(package private)  Pattern.Node next
           
 
Constructor Summary
(package private) Pattern.GroupHead(int localCount)
           
 
Method Summary
(package private)  Pattern.Node dup(boolean not)
           
(package private)  boolean match(Matcher matcher, int i, CharSequence seq)
          This method implements the classic accept node.
(package private)  boolean matchRef(Matcher matcher, int i, CharSequence seq)
           
(package private)  boolean study(Pattern.TreeInfo info)
          This method is good for all zero length assertions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localIndex

int localIndex

next

Pattern.Node next
Constructor Detail

Pattern.GroupHead

Pattern.GroupHead(int localCount)
Method Detail

match

boolean match(Matcher matcher,
              int i,
              CharSequence seq)
Description copied from class: Pattern.Node
This method implements the classic accept node.

Overrides:
match in class Pattern.Node

matchRef

boolean matchRef(Matcher matcher,
                 int i,
                 CharSequence seq)

dup

Pattern.Node dup(boolean not)

study

boolean study(Pattern.TreeInfo info)
This method is good for all zero length assertions.