private static Class<? extends AttributeImpl> getClassForInterface(Class<? extends Attribute> attClass) {
        synchronized(attClassImplMap) {
          final WeakReference<Class<? extends AttributeImpl>> ref = attClassImplMap.get(attClass);
          Class<? extends AttributeImpl> clazz = (ref == null) ? null : ref.get();
          if (clazz == null) {
            try {
              attClassImplMap.put(attClass,
                new WeakReference<Class<? extends AttributeImpl>>(
                  clazz = Class.forName(attClass.getName() + "Impl", true, attClass.getClassLoader())
                  .asSubclass(AttributeImpl.class)
                )
              );
            } catch (ClassNotFoundException e) {
              throw new IllegalArgumentException("Could not find implementing class for " + attClass.getName());
            }
          }
          return clazz;
        }
      }