1 4 package com.tc.aspectwerkz.joinpoint.impl; 5 6 import com.tc.aspectwerkz.joinpoint.CatchClauseRtti; 7 import com.tc.aspectwerkz.joinpoint.Rtti; 8 9 import java.lang.ref.WeakReference ; 10 11 16 public class CatchClauseRttiImpl implements CatchClauseRtti { 17 private final CatchClauseSignatureImpl m_signature; 18 19 private WeakReference m_thisRef; 20 21 private WeakReference m_targetRef; 22 23 private Object m_parameterValue; 24 25 32 public CatchClauseRttiImpl(final CatchClauseSignatureImpl signature, 33 final Object thisInstance, 34 final Object targetInstance) { 35 m_signature = signature; 36 m_thisRef = new WeakReference (thisInstance); 37 m_targetRef = new WeakReference (targetInstance); 38 } 39 40 47 public Rtti cloneFor(final Object thisInstance, final Object targetInstance) { 48 return new CatchClauseRttiImpl(m_signature, thisInstance, targetInstance); 49 } 50 51 56 public Object getThis() { 57 return m_thisRef.get(); 58 } 59 60 65 public Object getTarget() { 66 return m_targetRef.get(); 67 } 68 69 74 public Class getDeclaringType() { 75 return m_signature.getDeclaringType(); 76 } 77 78 87 public int getModifiers() { 88 return m_signature.getModifiers(); 89 } 90 91 96 public String getName() { 97 return m_signature.getName(); 98 } 99 100 105 public Class getParameterType() { 106 return m_signature.getParameterType(); 107 } 108 109 114 public Object getParameterValue() { 115 return getTarget(); } 117 118 124 public String toString() { 125 return super.toString(); 126 } 127 } | Popular Tags |