KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > prose > filter > PointFilter


1 //
2
// This file is part of the prose package.
3
//
4
// The contents of this file are subject to the Mozilla Public License
5
// Version 1.1 (the "License"); you may not use this file except in
6
// compliance with the License. You may obtain a copy of the License at
7
// http://www.mozilla.org/MPL/
8
//
9
// Software distributed under the License is distributed on an "AS IS" basis,
10
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
// for the specific language governing rights and limitations under the
12
// License.
13
//
14
// The Original Code is prose.
15
//
16
// The Initial Developer of the Original Code is Andrei Popovici. Portions
17
// created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
18
// All Rights Reserved.
19
//
20
// Contributor(s):
21
// $ITI: PointFilter.java,v 1.1 2000/10/16 11:53:23 popovici Exp $
22
// =====================================================================
23
//
24
// (history at end)
25
//
26

27 package ch.ethz.prose.filter;
28
29 import java.io.Serializable JavaDoc;
30
31 import ch.ethz.jvmai.JoinPoint;
32 import ch.ethz.prose.engine.JoinPointRequest;
33
34 /**
35  * Interface PointFilter is a strategy-object used by
36  * <code>AbstractCrosscut</code>. A <code>PointFilter</code>
37  * provides the functionality for filtering <code>JoinPointReqests</code>
38  * and the corresponding <code>JoinPointEvent</code>s in a consistent
39  * manner.
40  * <p>
41  * A <code>PointFilter</code> should document what types of events
42  * it considers as being <em>special</em>. The default is to reject events
43  * which this <code>PointFilter</code> cannot interpret.
44  * @version $ITIRevision: 1.1 $
45  * @author Andrei Popovici
46  */

47 public
48 abstract class PointFilter implements Serializable JavaDoc {
49
50
51
52   /**
53    * Return <code>true</code> if this crosscut specializer accepts
54    * the event <code>evRec</code>.
55    *
56    * @param evRec the request to be filtered
57    * @return <code>true</code> if the specified event is considered eligible (special)
58    * with respect to the strategy of this crosscut specializer
59    */

60   abstract public boolean isSpecialRequest(JoinPointRequest evRec);
61
62
63   /**
64    * Filter <code>execEvent</code> according to the strategy of this object.
65    *
66    * @param execEvent the event to be filtered
67    * @return <code>true</code> if <code>execEvent</code> is
68    * considered <em>special</em>,
69    * that is, if it corresponds to the filtering criterion defined by this object.
70    */

71   abstract public boolean isSpecialEvent(JoinPoint execEvent);
72 }
73
74
75 //======================================================================
76
//
77
// $ITIlog: PointFilter.java,v $
78
// Revision 1.1 2000/10/16 11:53:23 popovici
79
// Initial Revision
80
//
81
Popular Tags