KickJava   Java API By Example, From Geeks To Geeks.

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


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
//$Id: ObjectInClassNameFilter.java,v 1.1.1.1 2003/07/02 15:30:52 apopovic Exp $
22
//=====================================================================
23
//
24
//(history at end)
25
//
26

27 package ch.ethz.prose.filter;
28 /*---------------match--------------------*/
29   class ObjectInClassNameFilter extends ObjectFilter
30   {
31     NameExpression classExpr;
32
33     ObjectInClassNameFilter(int extractionMode,String JavaDoc className)
34       {
35     super(extractionMode);
36     this.classExpr = new NameExpression(className);
37       }
38
39     protected boolean doIsSpecialObject(Object JavaDoc target)
40       {
41     return classExpr.classMatchesRegexp(target.getClass());
42       }
43   }
44
45
46 //====================================================================
47
//
48
//$Log: ObjectInClassNameFilter.java,v $
49
//Revision 1.1.1.1 2003/07/02 15:30:52 apopovic
50
//Imported from ETH Zurich
51
//
52
//Revision 1.2 2003/05/06 15:51:42 popovici
53
//Mozilla-ification
54
//
55
//Revision 1.1 2003/05/05 13:58:05 popovici
56
//renaming from runes to prose
57
//
58
//Revision 1.1 2003/04/27 13:08:45 popovici
59
//Specializers renamed to PointCutter
60
//
61
//Revision 1.5 2003/04/17 12:49:33 popovici
62
//Refactoring of the crosscut package
63
// ExceptionCut renamed to ThrowCut
64
// McutSignature is now SignaturePattern
65
//
66
//Revision 1.4 2003/04/17 08:47:52 popovici
67
//Important functionality additions
68
// - Cflow specializers
69
// - Restructuring of the MethodCut, SetCut, ThrowCut, and GetCut (they are much smaller)
70
// - Transactional capabilities
71
// - Total refactoring of Specializer evaluation, which permits fine-grained distinction
72
// between static and dynamic specializers.
73
// - Functionality pulled up in abstract classes
74
// - Uniformization of advice methods patterns and names
75
//
76
//Revision 1.3 2003/03/05 10:48:46 popovici
77
//Adapted tot the IKS template form
78
//
79
//
80
Popular Tags