01: /**************************************************************************************
02: * Copyright (c) Jonas Bon?r, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the QPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package org.codehaus.aspectwerkz.expression;
08:
09: import java.io.Serializable;
10:
11: /**
12: * Type safe enum for the different matching types.
13: *
14: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
15: */
16: public class SubtypePatternType implements Serializable {
17:
18: public static final SubtypePatternType NOT_HIERARCHICAL = new SubtypePatternType(
19: "NOT_HIERARCHICAL");
20:
21: public static final SubtypePatternType MATCH_ON_ALL_METHODS = new SubtypePatternType(
22: "MATCH_ON_ALL_METHODS");
23:
24: public static final SubtypePatternType MATCH_ON_BASE_TYPE_METHODS_ONLY = new SubtypePatternType(
25: "MATCH_ON_BASE_TYPE_METHODS_ONLY");
26:
27: private final String myName;
28:
29: /**
30: * Creates a new instance
31: *
32: * @param name
33: */
34: private SubtypePatternType(final String name) {
35: myName = name;
36: }
37:
38: /**
39: * Returns the string representation.
40: *
41: * @return the string representation
42: */
43: public String toString() {
44: return myName;
45: }
46: }
|