1 7 package org.jboss.cache.aop; 8 9 import java.io.Serializable ; 10 11 23 public class AOPInstance implements Serializable 24 { 25 29 public static final Object KEY = "AOPInstance"; 32 33 protected transient Object instance_; 35 36 protected String refFqn_ = null; 39 40 protected int refCount_ = 0; 42 public AOPInstance() 43 { 44 } 45 46 public AOPInstance(Object instance) 47 { 48 set(instance); 49 } 50 51 Object get() 52 { 53 return instance_; 54 } 55 56 void set(Object instance) 57 { 58 instance_ = instance; 59 } 60 61 String getRefFqn() 62 { 63 return refFqn_; 64 } 65 66 void setRefFqn(String refFqn) 67 { 68 refFqn_ = refFqn; 69 } 70 71 void removeRefFqn() 72 { 73 refFqn_ = null; 74 } 75 76 int incrementRefCount() 77 { 78 refCount_ += 1; 79 return refCount_; 81 } 82 83 int decrementRefCount() 84 { 85 refCount_ -= 1; 86 return refCount_; 88 } 89 90 int getRefCount() 91 { 92 return refCount_; 93 } 94 } 95 | Popular Tags |