1 22 package org.jboss.aspects.versioned; 23 24 import org.jboss.util.id.GUID; 25 26 import java.lang.reflect.Method ; 27 import java.util.HashMap ; 28 29 30 31 36 public abstract class CollectionStateManager extends StateManager implements java.io.Externalizable 37 { 38 protected HashMap methodMap; 39 40 protected CollectionStateManager() {} 41 42 protected CollectionStateManager(GUID guid, long timeout, HashMap methodMap) 43 { 44 super(guid, timeout); 45 this.methodMap = methodMap; 46 } 47 48 public abstract HashMap getMethodMap(); 49 50 public Method isManagerMethod(Method method) 51 { 52 try 53 { 54 long hash = org.jboss.aop.util.MethodHashing.methodHash(method); 55 return (Method )methodMap.get(new Long (hash)); 56 } 57 catch (Exception ex) 58 { 59 throw new RuntimeException (ex); 60 } 61 } 62 public Method isManagerMethod(long hash) 63 { 64 return (Method )methodMap.get(new Long (hash)); 65 } 66 67 public void writeExternal(java.io.ObjectOutput out) 68 throws java.io.IOException 69 { 70 super.writeExternal(out); 71 } 72 73 public void readExternal(java.io.ObjectInput in) 74 throws java.io.IOException , ClassNotFoundException 75 { 76 super.readExternal(in); 77 } 78 } 79 | Popular Tags |