| java.lang.Object org.mockejb.interceptor.ClassPointcut
ClassPointcut | public class ClassPointcut implements Pointcut(Code) | | Tests if the given class matches the class
provided to the constructor of ClassPointcut.
author: Alexander Ananiev |
Constructor Summary | |
public | ClassPointcut(Class clazz) Creates a new instance of ClassPoincut
It will not match subclasses. | public | ClassPointcut(Class clazz, boolean matchSubclasses) Creates a new instance of ClassPoincut
Parameters: clazz - class to match Parameters: matchSubclasses - if true, the pointcut will also match all subclasses/subinterfaces of the provided class. |
Method Summary | |
public boolean | equals(Object obj) | public int | hashCode() | public boolean | matchesJointpoint(Method method) Tests if the class of the provided method is the same with the
the class provided to the constructor of this pointcut.
Note that it uses class equality, not instanceof. |
ClassPointcut | public ClassPointcut(Class clazz)(Code) | | Creates a new instance of ClassPoincut
It will not match subclasses.
Parameters: clazz - class to match |
ClassPointcut | public ClassPointcut(Class clazz, boolean matchSubclasses)(Code) | | Creates a new instance of ClassPoincut
Parameters: clazz - class to match Parameters: matchSubclasses - if true, the pointcut will also match all subclasses/subinterfaces of the provided class. |
equals | public boolean equals(Object obj)(Code) | | Returns true if the given object is of type ClassPointcut and
it handles the same class and handlesSubclasses flag is set to the
same value
|
hashCode | public int hashCode()(Code) | | |
matchesJointpoint | public boolean matchesJointpoint(Method method)(Code) | | Tests if the class of the provided method is the same with the
the class provided to the constructor of this pointcut.
Note that it uses class equality, not instanceof.
true if the provided method should be intercepted |
|
|