public class TokenPattern<T extends Token>
extends java.lang.Object
Tokenizerto provide a
 search mechanism for Tokens (typically of SQL or PL/SQL).
 Searches are applied using a regular expression like syntax, and applied only to the code, ignoring whitespace and comments.
 Token Pattern Syntax
 A token pattern expression is made up of one or more token clauses, where a token
 clause is defined as one of the following:
create or replace procedure updateSalary is...and
create or replace procedure hr.updateSalary is...the value of name in the first case being UPDATESALARY and in the second HR.UPDATESALARY. See
getNamedMatch(String name, boolean format)
 for details.
 
 Escaping Characters
 Any of the special syntax characters <>[]{}| can be
 escaped with a single backslash. If you need to explicitly search for
 any number of backslashes preceding a special character then place a
 space between them - for example "\\ <name>".
| Modifier and Type | Class and Description | 
|---|---|
class  | 
TokenPattern.PatternResult
The results of a test of a sequence of Tokens against a TokenPattern. 
 | 
| Constructor and Description | 
|---|
TokenPattern(java.lang.String expression)
Constructs a TokenPattern with the given expression. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected Tokenizer.Config | 
getConfig(java.lang.String expression)  | 
java.lang.String[] | 
getNames()  | 
TokenPattern.PatternResult | 
getResult(java.lang.String source)
Tokenizes the given source and attempts a pattern match from the first
 token. 
 | 
TokenPattern.PatternResult | 
getResult(java.lang.String source,
         boolean startsWith)
Tokenizes the given source and attempts a pattern match from the first
 token, optionally scanning until a match is found if startsWith == false. 
 | 
TokenPattern.PatternResult | 
getResult(T startTk)
Attempts a pattern match from the given token. 
 | 
TokenPattern.PatternResult | 
getResult(T startTk,
         boolean startsWith)
Attempts a pattern match from the given token, optionally scanning until a
 match is found if startsWith == false. 
 | 
TokenPattern.PatternResult | 
getResult(T startTk,
         T endTk)
Attempts a pattern match from the given start token, upto the given end token. 
 | 
TokenPattern.PatternResult | 
getResult(T startTk,
         T endTk,
         boolean startsWith)
Attempts a pattern match from the given token, upto the given end token,
 optionally scanning until a match is found if startsWith == false. 
 | 
public TokenPattern(java.lang.String expression)
expression - protected Tokenizer.Config getConfig(java.lang.String expression)
public java.lang.String[] getNames()
public TokenPattern.PatternResult getResult(java.lang.String source)
source - TokenPattern.PatternResult is returned.
 null otherwise.public TokenPattern.PatternResult getResult(java.lang.String source, boolean startsWith)
source - startsWith - TokenPattern.PatternResult is returned.
 null otherwise.public TokenPattern.PatternResult getResult(T startTk)
startTk - TokenPattern.PatternResult is returned.  null otherwise.public TokenPattern.PatternResult getResult(T startTk, boolean startsWith)
startTk - startsWith - TokenPattern.PatternResult is returned.  null otherwise.public TokenPattern.PatternResult getResult(T startTk, T endTk)
startTk - endTk - TokenPattern.PatternResult is returned.  null otherwise.public TokenPattern.PatternResult getResult(T startTk, T endTk, boolean startsWith)
startTk - endTk - startsWith - TokenPattern.PatternResult is returned.  null otherwise.