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 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 }