Sun Adapter for SAG API

com.stc.connector.sagadapter.namepattern
Class NameMatcher

java.lang.Object
  extended by com.stc.connector.sagadapter.namepattern.NameMatcher

public class NameMatcher
extends java.lang.Object

It is used to match names which are formatted/expanded from class com.stc.connector.sagadapter.sagapi.NamePattern. For details about rule/syntax, please see com.stc.connector.sagadapter.sagapi.NamePattern.

Version:
cvs revision: $Revision: 1.5 $ Last Modified: $Date: 2008/04/03 16:22:01 $
Author:
Harry Liu (harry.liu@sun.com)

Field Summary
static int CANON_EQ
           
static int CASE_INSENSITIVE
           
static int COMMENTS
           
static int DOTALL
           
static int LITERAL
           
static int MULTILINE
           
static int UNICODE_CASE
           
static int UNIX_LINES
           
static java.lang.String version
           
 
Constructor Summary
NameMatcher(java.lang.String rawPattern)
          Creates a new instance of NameMatcher
NameMatcher(java.lang.String rawPattern, int flags)
          Creates a new instance of NameMatcher
NameMatcher(java.lang.String rawPattern, java.lang.String workingFileName)
          Creates a new instance of NameMatcher
NameMatcher(java.lang.String rawPattern, java.lang.String workingFileName, int flags)
          Creates a new instance of NameMatcher
 
Method Summary
 boolean find(java.lang.String input)
          Finds the input agaisnt pattern
 java.lang.String getRawPattern()
           
 java.util.regex.Matcher getRegexMatcher(java.lang.String input)
          Gets the java.util.regex.Matcher
 java.util.regex.Pattern getRegexPattern()
          Compiles the rawPattern into regexPattern
 java.lang.String getWorkingFileName()
           
 boolean lookingAt(java.lang.String input)
          Looks at the input agaisnt pattern
 boolean matches(java.lang.String input)
          Matches the input agaisnt pattern
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static final java.lang.String version
See Also:
Constant Field Values

UNIX_LINES

public static final int UNIX_LINES
See Also:
Constant Field Values

CASE_INSENSITIVE

public static final int CASE_INSENSITIVE
See Also:
Constant Field Values

COMMENTS

public static final int COMMENTS
See Also:
Constant Field Values

MULTILINE

public static final int MULTILINE
See Also:
Constant Field Values

LITERAL

public static final int LITERAL
See Also:
Constant Field Values

DOTALL

public static final int DOTALL
See Also:
Constant Field Values

UNICODE_CASE

public static final int UNICODE_CASE
See Also:
Constant Field Values

CANON_EQ

public static final int CANON_EQ
See Also:
Constant Field Values
Constructor Detail

NameMatcher

public NameMatcher(java.lang.String rawPattern,
                   java.lang.String workingFileName,
                   int flags)
Creates a new instance of NameMatcher

Parameters:
rawPattern - The % pattern
workingFileName - It is used for %f
flags - Match flags, a bit mask that may include CASE_INSENSITIVE, MULTILINE, DOTALL, UNICODE_CASE, and CANON_EQ

NameMatcher

public NameMatcher(java.lang.String rawPattern,
                   java.lang.String workingFileName)
Creates a new instance of NameMatcher

Parameters:
rawPattern - The % pattern
workingFileName - It is used for %f

NameMatcher

public NameMatcher(java.lang.String rawPattern,
                   int flags)
Creates a new instance of NameMatcher

Parameters:
rawPattern - The % pattern
flags - Match flags, a bit mask that may include CASE_INSENSITIVE, MULTILINE, DOTALL, UNICODE_CASE, and CANON_EQ

NameMatcher

public NameMatcher(java.lang.String rawPattern)
Creates a new instance of NameMatcher

Parameters:
rawPattern - The % pattern
Method Detail

getWorkingFileName

public java.lang.String getWorkingFileName()
Returns:

getRawPattern

public java.lang.String getRawPattern()
Returns:

getRegexPattern

public java.util.regex.Pattern getRegexPattern()
Compiles the rawPattern into regexPattern


getRegexMatcher

public java.util.regex.Matcher getRegexMatcher(java.lang.String input)
Gets the java.util.regex.Matcher


matches

public boolean matches(java.lang.String input)
Matches the input agaisnt pattern


find

public boolean find(java.lang.String input)
Finds the input agaisnt pattern


lookingAt

public boolean lookingAt(java.lang.String input)
Looks at the input agaisnt pattern


Sun Adapter for SAG API

Copyright © 2008 Sun Microsystems, Inc. All rights reserved.