samples/friendpackage/src/implpkg/Accessor.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:50:27 +0200
changeset 0 32b39aaa68f0
child 3 b44baa125b38
permissions -rw-r--r--
Adding friend access example
     1 /*
     2  *                 Sun Public License Notice
     3  * 
     4  * The contents of this file are subject to the Sun Public License
     5  * Version 1.0 (the "License"). You may not use this file except in
     6  * compliance with the License. A copy of the License is available at
     7  * http://www.sun.com/
     8  * 
     9  * The Original Code is NetBeans. The Initial Developer of the Original
    10  * Code is Sun Microsystems, Inc. Portions Copyright 1999-2006 Sun
    11  * Microsystems, Inc. All Rights Reserved.
    12  */
    13 
    14 package implpkg;
    15 
    16 import apipkg.Item;
    17 import javax.swing.event.ChangeListener;
    18 
    19 /**
    20  *
    21  * @author Jaroslav Tulach
    22  */
    23 public abstract class Accessor {
    24     public static Accessor DEFAULT;
    25     static {
    26         try {
    27             Class.forName(Item.class.getName(), true, Item.class.getClassLoader());
    28         } catch (Exception ex) {
    29             ex.printStackTrace();
    30         }
    31     }
    32     
    33     public Accessor() {
    34     }
    35 
    36     protected abstract Item newItem();
    37     protected abstract void addChangeListener(Item item, ChangeListener l);
    38 }