org.eclipse.m2m.atl.adt.ui.text
Class AtlHeuristicScanner.SkippingScopeMatch

java.lang.Object
  extended by org.eclipse.m2m.atl.adt.ui.text.AtlHeuristicScanner.SkippingScopeMatch
All Implemented Interfaces:
AtlHeuristicScanner.StopCondition
Enclosing class:
AtlHeuristicScanner

protected class AtlHeuristicScanner.SkippingScopeMatch
extends java.lang.Object

Acts like character match, but skips all scopes introduced by parenthesis, brackets, and braces.


Constructor Summary
AtlHeuristicScanner.SkippingScopeMatch(char ch)
          Creates a new instance.
AtlHeuristicScanner.SkippingScopeMatch(char[] chars)
          Creates a new instance.
 
Method Summary
 boolean stop(char ch, int position, boolean forward)
          Instructs the scanner to return the current position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtlHeuristicScanner.SkippingScopeMatch

public AtlHeuristicScanner.SkippingScopeMatch(char ch)
Creates a new instance.

Parameters:
ch - the single character to match

AtlHeuristicScanner.SkippingScopeMatch

public AtlHeuristicScanner.SkippingScopeMatch(char[] chars)
Creates a new instance.

Parameters:
chars - the chars to match.
Method Detail

stop

public boolean stop(char ch,
                    int position,
                    boolean forward)
Description copied from interface: AtlHeuristicScanner.StopCondition
Instructs the scanner to return the current position.

Specified by:
stop in interface AtlHeuristicScanner.StopCondition
Parameters:
ch - the char at the current position
position - the current position
forward - the iteration direction
Returns:
true if the stop condition is met.

Copyright 2007 IBM Corporation and others.
All Rights Reserved.