01: //
02: // This file is part of the prose package.
03: //
04: // The contents of this file are subject to the Mozilla Public License
05: // Version 1.1 (the "License"); you may not use this file except in
06: // compliance with the License. You may obtain a copy of the License at
07: // http://www.mozilla.org/MPL/
08: //
09: // 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: ObjectInPackageFilter.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:
29: /*---------------match name--------------------*/
30: class ObjectInPackageFilter extends ObjectFilter {
31: private static final long serialVersionUID = 3977862877812176177L;
32: NameExpression classExpr;
33:
34: ObjectInPackageFilter(int objectExtractionMode, String className) {
35: super (objectExtractionMode);
36: this .classExpr = new NameExpression(className);
37: }
38:
39: protected boolean doIsSpecialObject(Object target) {
40: return classExpr.packageMatchesRegexp(target.getClass());
41: }
42: }
43:
44: //====================================================================
45: //
46: //$Log: ObjectInPackageFilter.java,v $
47: //Revision 1.1.1.1 2003/07/02 15:30:52 apopovic
48: //Imported from ETH Zurich
49: //
50: //Revision 1.2 2003/05/06 15:51:43 popovici
51: //Mozilla-ification
52: //
53: //Revision 1.1 2003/05/05 13:57:46 popovici
54: //renaming from runes to prose
55: //
56: //Revision 1.5 2003/04/17 12:49:31 popovici
57: //Refactoring of the crosscut package
58: // ExceptionCut renamed to ThrowCut
59: // McutSignature is now SignaturePattern
60: //
61: //Revision 1.4 2003/04/17 08:47:52 popovici
62: //Important functionality additions
63: // - Cflow specializers
64: // - Restructuring of the MethodCut, SetCut, ThrowCut, and GetCut (they are much smaller)
65: // - Transactional capabilities
66: // - Total refactoring of Specializer evaluation, which permits fine-grained distinction
67: // between static and dynamic specializers.
68: // - Functionality pulled up in abstract classes
69: // - Uniformization of advice methods patterns and names
70: //
71: //Revision 1.3 2003/03/05 10:48:48 popovici
72: //Adapted tot the IKS template form
73: //
74: //
|