@Override
	@SuppressWarnings("unchecked")
	public void addLayoutListener(LayoutListener<V, E> listener) {
		Class<? extends LayoutListener<V, E>> listenerClass =
			(Class<? extends LayoutListener<V, E>>) listener.getClass();
		if (listenerClass.isAnonymousClass()) {
			throw new AssertException("Cannot add anonymous listeners to a weak collection!");
		}
		listeners.add(new WeakReference<>(listener));
	}
A wrapper that allows for existing Jung layouts to be used inside of the Visual Graph system. 

@param <V> the vertex type
@param <E> the edge type
Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/layout/JungWrappingVisualGraphLayoutAdapter.java