title: Where is final parameter stored in anonymous class instance?
body: <p>I have the following static factory method that creates a list view out of an int array:</p>
  
  <pre><code>public static List&lt;Integer&gt; newInstance(final int[] numbers) {
      return new AbstractList&lt;Integer&gt;() {
  
          @Override
          public Integer get(int index) {
              return numbers[index];
          }
  
          @Override
          public int size() {
              return numbers.length;
          }
      };
  }
  
  
  public static void main(String[] args) {
      int[] sequence = {10, 20, 30};
      List&lt;Integer&gt; list = ListFactory.newInstance(sequence);
      System.out.println("List is "+list);
  
  }
  </code></pre>
  
  <p>In "Effective Java", Joshua Bloch mentioned this </p>
  
  <blockquote>
    <p>as an Adapter that allows an int array to be viewed as a list of Integer instances.</p>
  </blockquote>
  
  <p>However, I remember that Adapter uses composition and the instance of the anonymous list implementation should use the int[] as a member field.</p>
  
  <p>Where exactly is the int[] input parameter stored if it's not a member field of the anonymous list implementation?</p>
  
  <p>I would appreciate if anyone could provide some insights or some links to look for more information.</p>