org.mockejb.interceptor
Class ClassPatternPointcut

java.lang.Object
  extended byorg.mockejb.interceptor.ClassPatternPointcut
All Implemented Interfaces:
Pointcut

public class ClassPatternPointcut
extends java.lang.Object
implements Pointcut

Tests if the class name of the provided method matches the regexp.

Author:
Alexander Ananiev

Constructor Summary
ClassPatternPointcut(java.lang.String regexpPattern)
          Creates a new instance of ClassPatternPoincut
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if the given object is of the same type and it has the same pattern.
 int hashCode()
           
 boolean matchesJointpoint(java.lang.reflect.Method method)
          Tests if the fully qualified class name of the given method
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassPatternPointcut

public ClassPatternPointcut(java.lang.String regexpPattern)
Creates a new instance of ClassPatternPoincut

Parameters:
regexpPattern - regexp pattern that will be matched against the fully qualified class name
Method Detail

matchesJointpoint

public boolean matchesJointpoint(java.lang.reflect.Method method)
Tests if the fully qualified class name of the given method

Specified by:
matchesJointpoint in interface Pointcut
Parameters:
method - method being invoked
Returns:
true if the provided method should be intercepted

equals

public boolean equals(java.lang.Object obj)
Returns true if the given object is of the same type and it has the same pattern.


hashCode

public int hashCode()