com.aptana.ide.lexer.matcher
Class AndMatcher

java.lang.Object
  extended by com.aptana.xml.NodeBase
      extended by com.aptana.ide.lexer.matcher.model.MatcherElement
          extended by com.aptana.ide.lexer.matcher.AbstractTextMatcher
              extended by com.aptana.ide.lexer.matcher.AndMatcher
All Implemented Interfaces:
ITextMatcher, IMatcherElement, INode, java.lang.Comparable
Direct Known Subclasses:
NumberMatcher

public class AndMatcher
extends AbstractTextMatcher

Author:
Kevin Lindsey

Constructor Summary
AndMatcher()
          MatcherGroup
 
Method Summary
 void addChildTypes()
          addChildTypes
 void addFirstCharacters(MatcherMap map, ITextMatcher target)
          This functions the same as addFirstCharacter(MatcherMap); however, the matcher that will use this matcher's first character as a possible transition is specified in the target parameter.
 boolean canMatchNothing()
          Return a flag indicating if this matcher can return a positive match without consuming characters
 int match(char[] source, int offset, int eofset)
          Gets the ending position of the match starting at the offset.
 java.lang.String toString()
           
 
Methods inherited from class com.aptana.ide.lexer.matcher.AbstractTextMatcher
accept, accept, addFirstCharacters, addNameValueChangeListener, createToken, getExpressionRoot, getMatchedToken, getName, getNameValue, getToken, removeNameValueChangeListener, setMatchedToken, setName, setNameValue, setParent, setToken, validateLocal, wrapChildrenInAndElement
 
Methods inherited from class com.aptana.ide.lexer.matcher.model.MatcherElement
appendChild, createChildrenTokens, createTokens, getCategory, getGroup, getSwitchTo, getType, getTypeDefinedInSubtree, setCategory, setGroup, setSwitchTo, setType, validate, validateChildren
 
Methods inherited from class com.aptana.xml.NodeBase
addChildType, appendText, compareTo, getChild, getChildCount, getColumnNumber, getDocument, getLineNumber, getParent, getText, removeChild, removeChildType, setColumnNumber, setLineNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.aptana.xml.INode
appendChild, appendText, getChild, getChildCount, getColumnNumber, getDocument, getLineNumber, getParent, getText, removeChild, setColumnNumber, setLineNumber
 

Constructor Detail

AndMatcher

public AndMatcher()
MatcherGroup

Method Detail

addChildTypes

public void addChildTypes()
Description copied from class: AbstractTextMatcher
addChildTypes

Specified by:
addChildTypes in class AbstractTextMatcher
See Also:
AbstractTextMatcher.addChildTypes()

canMatchNothing

public boolean canMatchNothing()
Description copied from interface: ITextMatcher
Return a flag indicating if this matcher can return a positive match without consuming characters

Specified by:
canMatchNothing in interface ITextMatcher
Overrides:
canMatchNothing in class AbstractTextMatcher
Returns:
boolean
See Also:
AbstractTextMatcher.canMatchNothing()

addFirstCharacters

public void addFirstCharacters(MatcherMap map,
                               ITextMatcher target)
Description copied from interface: ITextMatcher
This functions the same as addFirstCharacter(MatcherMap); however, the matcher that will use this matcher's first character as a possible transition is specified in the target parameter.

Specified by:
addFirstCharacters in interface ITextMatcher
Overrides:
addFirstCharacters in class AbstractTextMatcher
See Also:
AbstractTextMatcher.addFirstCharacters(com.aptana.ide.lexer.matcher.MatcherMap, com.aptana.ide.lexer.matcher.ITextMatcher)

match

public int match(char[] source,
                 int offset,
                 int eofset)
Description copied from interface: ITextMatcher
Gets the ending position of the match starting at the offset. Return -1 if no match occured.

Specified by:
match in interface ITextMatcher
Specified by:
match in class AbstractTextMatcher
Parameters:
source - character array to walk
offset - offset into array
eofset - end of file offset
Returns:
Returns the offset where the match ended or -1 if no match occurred
See Also:
ITextMatcher.match(char[], int, int)

toString

public java.lang.String toString()
Overrides:
toString in class AbstractTextMatcher
See Also:
Object.toString()