View Javadoc

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;
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 {
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      private final String myName;
27  
28      /***
29       * Creates a new instance
30       * 
31       * @param name
32       */
33      private SubtypePatternType(final String name) {
34          myName = name;
35      }
36  
37      /***
38       * Returns the string representation.
39       * 
40       * @return the string representation
41       */
42      public String toString() {
43          return myName;
44      }
45  }