Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ch.ethz.prose.filter
Class PointCutter  view PointCutter download PointCutter.java

java.lang.Object
  extended bych.ethz.prose.filter.PointFilter
      extended bych.ethz.prose.filter.CompositePointFilter
          extended bych.ethz.prose.filter.PointCutter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbstractCrosscutSpecializerTest.SpecializerSmaller, ANDingPointCutter, Cflow.BelowMethodCut, Cflow.BelowPointCutter, ExceptionMessageFilter, ExceptionsClassFilter, ExceptionTypeFilter, ExecutionsAclFilter, ExecutionsAtMethodEntry, ExecutionsInClassFilter, ExecutionsInMethodFilter, ExecutionsInSubclassFilter, ExecutionsInSystemClass, FieldsInClassFilter, FieldsInTypeFilter, FieldsNamedFilter, FieldsWithModifierFilter, NegatingPointCutter, ObjectFilter, ORingPointCutter

public abstract class PointCutter
extends CompositePointFilter
implements java.io.Serializable

Class PointCutter is an abstract implementation of PointFilter which additionaly defines two operators AND, resp. OR that allow the construction of PointFilter objects via combination of existing specializer instances.

Expected Use

the following construction should be legal:
 PointFilter x = (new MethodEntries(      ) ) .AND
                          (new MethodNanmes("*Foo")  )

 
Subclasses of PointCutter are mandated to implement a toString method of their own which describes in an executive way their name.

Version:
$Revision: 1.2 $

Field Summary
 int acceptMask
           
 int canFilterStaticallyMask
           
 int mayFilterStaticallyMask
           
(package private)  java.lang.String txt
          This method sets the value of the String returned by toString.
 
Constructor Summary
PointCutter()
           
 
Method Summary
 PointCutter AND(PointCutter other)
          Return a new PointCutter such that: An event e is considered special if both this PointCutter, as well as other consider e as special.
protected abstract  boolean doIsSpecialEvent(ch.ethz.jvmai.CodeJoinPoint execEvent)
          Template method, to be implemented by subclasses.
protected abstract  boolean doIsSpecialRequest(ch.ethz.prose.engine.JoinPointRequest req)
          Template method, to be implemented by subclasses.
 boolean isSpecialEvent(ch.ethz.jvmai.JoinPoint execEvent)
          Subclasses of this class should, in conformance with the PointFilter abstract class, implement this method.
 boolean isSpecialRequest(ch.ethz.prose.engine.JoinPointRequest evRec)
          Subclasses of this class should, in conformance with the PointFilter abstract class, implement this method.
 java.util.List memberPointFilters()
          Default implementation of the memberPointFilters method.
 PointCutter OR(PointCutter other)
          Return a new PointCutter such that: An event e is considered special if either this PointCutter, or other consider e as special, or both.
 void setToString(java.lang.String txt)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

acceptMask

public int acceptMask

mayFilterStaticallyMask

public int mayFilterStaticallyMask

canFilterStaticallyMask

public int canFilterStaticallyMask

txt

java.lang.String txt
This method sets the value of the String returned by toString.

Constructor Detail

PointCutter

public PointCutter()
Method Detail

isSpecialRequest

public boolean isSpecialRequest(ch.ethz.prose.engine.JoinPointRequest evRec)
Subclasses of this class should, in conformance with the PointFilter abstract class, implement this method.

This method checks whether this PointCutter accepts the kind of requests of evRec (see acceptMask) . If it accepts such events, it calls the template method doIsSpecialRequest if evRec can be filtered statically (see mayFilterStatically).

Specified by:
isSpecialRequest in class PointFilter

isSpecialEvent

public boolean isSpecialEvent(ch.ethz.jvmai.JoinPoint execEvent)
Subclasses of this class should, in conformance with the PointFilter abstract class, implement this method.

This method checks whether this PointCutter accepts the kind of requests of evRec (see acceptMask) . If it accepts such events, it calls the template method doIsSpecialRequest if evRec can be filtered dynamically(see canFilterStatically).

Specified by:
isSpecialEvent in class PointFilter

doIsSpecialEvent

protected abstract boolean doIsSpecialEvent(ch.ethz.jvmai.CodeJoinPoint execEvent)
Template method, to be implemented by subclasses.


doIsSpecialRequest

protected abstract boolean doIsSpecialRequest(ch.ethz.prose.engine.JoinPointRequest req)
Template method, to be implemented by subclasses.


memberPointFilters

public java.util.List memberPointFilters()
Default implementation of the memberPointFilters method. It returns this PointCutter.

Specified by:
memberPointFilters in class CompositePointFilter

AND

public PointCutter AND(PointCutter other)
Return a new PointCutter such that:
  • An event e is considered special if both this PointCutter, as well as other consider e as special.
  • A request r is considered special if both this PointCutter, as well as other consider r as special.
. This method is syntactic sugar.


OR

public PointCutter OR(PointCutter other)
Return a new PointCutter such that:
  • An event e is considered special if either this PointCutter, or other consider e as special, or both.
  • A request r is considered special if either this PointCutter, or other considers r as special, or both.
. This method is syntactic sugar.


setToString

public void setToString(java.lang.String txt)

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).