title: 'Swizzle' (Maybe by Reflection?) addView() On Android
body: <p>I'm aware you cannot actually Swizzle in Java.</p>
  
  <p>I was doing some research and I think 'maybe' you can do Reflection in Java to accomplish Swizzle like behaviour (that you can do on iOS).</p>
  
  <p>The culprit (and one of the worst design decisions I've ever seen) is the <code>addView()</code> function on all Android ViewGroup objects. You must explicitly check if the parent is null (you sometimes even need to cast the parent to get the behaviour you need!). Gross.</p>
  
  <p>I want to change the behaviour of this (without creating a million subclasses) by having the <code>addView()</code> method do this check automatically so the client code can ignore this.</p>
  
  <p>Is this something I can do with Reflection (from what I grasp it would require special runtime calling, instead of actually changing the root method call [so maybe not good enough]), or something else? Or am I barking up the wrong tree?</p>