KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > aspectwerkz > expression > SubtypePatternType


1 /**************************************************************************************
2  * Copyright (c) Jonas Bon?r, Alexandre Vasseur. All rights reserved. *
3  * http://aspectwerkz.codehaus.org *
4  * ---------------------------------------------------------------------------------- *
5  * The software in this package is published under the terms of the QPL license *
6  * a copy of which has been included with this distribution in the license.txt file. *
7  **************************************************************************************/

8 package org.codehaus.aspectwerkz.expression;
9
10 import java.io.Serializable JavaDoc;
11
12 /**
13  * Type safe enum for the different matching types.
14  *
15  * @author <a HREF="mailto:jboner@codehaus.org">Jonas BonŽr </a>
16  */

17 public class SubtypePatternType implements Serializable JavaDoc {
18
19     public static final SubtypePatternType NOT_HIERARCHICAL = new SubtypePatternType("NOT_HIERARCHICAL");
20
21     public static final SubtypePatternType MATCH_ON_ALL_METHODS = new SubtypePatternType("MATCH_ON_ALL_METHODS");
22
23     public static final SubtypePatternType MATCH_ON_BASE_TYPE_METHODS_ONLY = new SubtypePatternType(
24             "MATCH_ON_BASE_TYPE_METHODS_ONLY"
25     );
26
27     private final String JavaDoc myName;
28
29     /**
30      * Creates a new instance
31      *
32      * @param name
33      */

34     private SubtypePatternType(final String JavaDoc name) {
35         myName = name;
36     }
37
38     /**
39      * Returns the string representation.
40      *
41      * @return the string representation
42      */

43     public String JavaDoc toString() {
44         return myName;
45     }
46 }
Popular Tags