KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > aspectj > internal > lang > reflect > TypePatternBasedPerClauseImpl


1 /* *******************************************************************
2  * Copyright (c) 2005 Contributors.
3  * All rights reserved.
4  * This program and the accompanying materials are made available
5  * under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution and is available at
7  * http://eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Adrian Colyer Initial implementation
11  * ******************************************************************/

12 package org.aspectj.internal.lang.reflect;
13
14 import org.aspectj.lang.reflect.PerClauseKind;
15 import org.aspectj.lang.reflect.TypePattern;
16 import org.aspectj.lang.reflect.TypePatternBasedPerClause;
17
18 /**
19  * @author colyer
20  *
21  */

22 public class TypePatternBasedPerClauseImpl extends PerClauseImpl implements
23         TypePatternBasedPerClause {
24
25     private TypePattern typePattern;
26
27     public TypePatternBasedPerClauseImpl(PerClauseKind kind, String JavaDoc pattern) {
28         super(kind);
29         this.typePattern = new TypePatternImpl(pattern);
30     }
31
32     /* (non-Javadoc)
33      * @see org.aspectj.lang.reflect.TypePatternBasedPerClause#getTypePattern()
34      */

35     public TypePattern getTypePattern() {
36         return this.typePattern;
37     }
38     
39     public String JavaDoc toString() {
40         return "pertypewithin(" + typePattern.asString() + ")";
41     }
42
43 }
44
Popular Tags