title: Why isn 't Object.class a catch all?
body: <p>I was writing an application where I had to use foo.setDefaultRenderer(Object.class, new FooRenderer()). When the program was running it did not do what I expected. Namely only Strings were getting colored correctly while Integers, Shorts etc did not get colored correctly. I had assumed that using Object.class would have worked for all types. Why was it necessary to use Short.class and Integer.class in order for the Render to work correctly?</p>
  
  <p>Edit 1: below is the code that was requested. The application itself now works because I put in the below four lines but I'd like to understand why Object.class wouldn't catch all of the possible types.</p>
  
  <pre><code>foo.setDefaultRenderer(Integer.class, new FooRenderer());
  foo.setDefaultRenderer(Short.class,new FooRenderer());
  foo.setDefaultRenderer(String.class, new FooRenderer());
  foo.setDefaultRenderer(Object.class, new FooRenderer());
  </code></pre>