Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
1 package org.apidesign.friendpackage.impl;
3 import javax.swing.event.ChangeListener;
4 import org.apidesign.friendpackage.api.Item;
8 * @author Jaroslav Tulach
10 // BEGIN: design.less.friend.Accessor
11 public abstract class Accessor {
12 private static volatile Accessor DEFAULT;
13 public static Accessor getDefault() {
16 throw new IllegalStateException("Something is wrong: " + a);
21 public static void setDefault(Accessor accessor) {
22 if (DEFAULT != null) {
23 throw new IllegalStateException();
31 protected abstract Item newItem();
32 protected abstract void addChangeListener(Item item, ChangeListener l);
33 // FINISH: design.less.friend.Accessor
35 // BEGIN: design.less.friend.InitAPI
36 private static final Class<?> INIT_API_CLASS = loadClass(
39 private static Class<?> loadClass(String name) {
42 name, true, Accessor.class.getClassLoader()
44 } catch (Exception ex) {
45 throw new RuntimeException(ex);
48 // END: design.less.friend.InitAPI