1 4 package com.tc.aspectwerkz.aspect; 5 6 import java.io.Serializable ; 7 8 13 public class AdviceType implements Serializable { 14 15 public static final AdviceType AROUND = new AdviceType("around"); 16 public static final AdviceType BEFORE = new AdviceType("before"); 17 public static final AdviceType AFTER = new AdviceType("after"); 18 public static final AdviceType AFTER_FINALLY = new AdviceType("afterFinally"); 19 public static final AdviceType AFTER_RETURNING = new AdviceType("afterReturning"); 20 public static final AdviceType AFTER_THROWING = new AdviceType("afterThrowing"); 21 22 private final String m_name; 23 24 private AdviceType(String name) { 25 m_name = name; 26 } 27 28 public String toString() { 29 return m_name; 30 } 31 32 public boolean equals(Object o) { 33 if (this == o) { 34 return true; 35 } 36 if (!(o instanceof AdviceType)) { 37 return false; 38 } 39 final AdviceType adviceType = (AdviceType) o; 40 if ((m_name != null) ? (!m_name.equals(adviceType.m_name)) : (adviceType.m_name != null)) { 41 return false; 42 } 43 return true; 44 } 45 46 public int hashCode() { 47 return ((m_name != null) ? m_name.hashCode() : 0); 48 } 49 } | Popular Tags |