org.codehaus.aspectwerkz.expression.regexp
Class NamePattern

java.lang.Object
  extended byorg.codehaus.aspectwerkz.expression.regexp.Pattern
      extended byorg.codehaus.aspectwerkz.expression.regexp.NamePattern
All Implemented Interfaces:
Serializable

public class NamePattern
extends Pattern

Implements the regular expression pattern matcher for names.

Author:
Jonas Bonér
See Also:
Serialized Form

Field Summary
protected  com.karneim.util.collection.regex.Pattern m_namePattern
          The name pattern.
protected  String m_pattern
          The name pattern as a string.
 
Fields inherited from class org.codehaus.aspectwerkz.expression.regexp.Pattern
ABBREVIATIONS, EAGER_WILDCARD, REGULAR_WILDCARD
 
Method Summary
protected static boolean areEqualsOrBothNull(Object o1, Object o2)
           
 boolean equals(Object o)
           
protected  void escape(String namePattern)
          Escapes the name pattern.
 String getPattern()
          Returns the pattern as a string.
 int hashCode()
           
protected static int hashCodeOrZeroIfNull(Object o)
           
 boolean matches(String name)
          Matches a name.
 
Methods inherited from class org.codehaus.aspectwerkz.expression.regexp.Pattern
compileNamePattern, compileTypePattern
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_namePattern

protected transient com.karneim.util.collection.regex.Pattern m_namePattern
The name pattern.


m_pattern

protected String m_pattern
The name pattern as a string.

Method Detail

matches

public boolean matches(String name)
Matches a name.

Parameters:
name - the name
Returns:
true if we have a matche

getPattern

public String getPattern()
Returns the pattern as a string.

Returns:
the pattern

escape

protected void escape(String namePattern)
Escapes the name pattern.

Parameters:
namePattern - the name pattern

hashCode

public int hashCode()

hashCodeOrZeroIfNull

protected static int hashCodeOrZeroIfNull(Object o)

equals

public boolean equals(Object o)

areEqualsOrBothNull

protected static boolean areEqualsOrBothNull(Object o1,
                                             Object o2)


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.