extracting the accessor initialization outside of the API block of the Item class
authorJaroslav Tulach <jtulach@netbeans.org>
Fri, 24 Oct 2008 11:32:33 +0200
changeset 285321b25b8f6f8
parent 284 73477ff04378
child 286 ac16aae50d58
extracting the accessor initialization outside of the API block of the Item class
samples/friendpackage/src/apipkg/Item.java
     1.1 --- a/samples/friendpackage/src/apipkg/Item.java	Fri Oct 17 09:23:37 2008 +0200
     1.2 +++ b/samples/friendpackage/src/apipkg/Item.java	Fri Oct 24 11:32:33 2008 +0200
     1.3 @@ -13,12 +13,6 @@
     1.4      private int value;
     1.5      private ChangeListener listener;
     1.6  
     1.7 -    // BEGIN: design.less.friend.Item.static
     1.8 -    static {
     1.9 -        Accessor.setDefault(new AccessorImpl());
    1.10 -    }
    1.11 -    // END: design.less.friend.Item.static
    1.12 -    
    1.13      /** Only friends can create instances. */
    1.14      Item() {
    1.15      }
    1.16 @@ -45,6 +39,11 @@
    1.17          assert listener == null;
    1.18          listener = l;
    1.19      }
    1.20 -    
    1.21 +// FINISH: design.less.friend.Item
    1.22 +
    1.23 +    // BEGIN: design.less.friend.Item.static
    1.24 +    static {
    1.25 +        Accessor.setDefault(new AccessorImpl());
    1.26 +    }
    1.27 +    // END: design.less.friend.Item.static
    1.28  }
    1.29 -// END: design.less.friend.Item