title: Java: Disclosing protected value from object static Class using casting
body: <p>Note: I found multiple information about disclose (get) value of protected fields or members of some class, my difference its a need to obtain of instanced objects...</p>
  
  <p>Hi, I want to disclose information the previously instanced static Inner class (Object previously created)...</p>
  
  <pre><code>static public class Outer {
    static class Inner {
      protected int number = 0;
      protected int times = 2;
  
      public Inner(int number) {
        this.number = number;
      }
    }
  }
  
  Outer.Inner oi = new Outer.Inner(8);
  </code></pre>
  
  <p>I want to print the value of instanced Class, because I don't know how was instanced (what argument was passed).</p>
  
  <p>How?</p>
  
  <p>I was thinking something...</p>
  
  <pre><code>  class Another extends Outer.Inner {
      Another(int j) {
        super(j);
      }
  
      public void submit() {
        System.out.println("the constructor argument was:" + number);
      }
    }
  </code></pre>
  
  <p>In other class, of my own project I'm using 'oi', but I need to reveal its information (I don't want to change the original class) and to find where is the object created.</p>
  
  <p>Is there a solution to accomplish this?</p>
  
  <pre><code>Another a = (Another)oi;
  a.submit();  // I want to print the original argument.
  </code></pre>