@Override
			protected Layout<V, E> createLayout(G g) {

				try {
					Constructor<?> c = layoutClass.getConstructor(Graph.class);

					// we are using the interface to this factory to get compile-time 
					// enforcement of types; at this point we cannot enforce types using a 
					// class object to create a new layout
					@SuppressWarnings("unchecked")
					Layout<V, E> l = (Layout<V, E>) c.newInstance(g);
					return l;
				}
				catch (Exception e) {
					Msg.error(JungLayoutProviderFactory.class,
						"Unable to construct layout: " + layoutClass, e);
				}
				return null;
			}
A factory to produce {@link JungLayoutProvider}s that can be used to layout 
{@link VisualGraph}s
Ghidra/Framework/Graph/src/main/java/ghidra/graph/viewer/layout/JungLayoutProviderFactory.java