/* * Snippet to add to your PartTypeImpl to support * the V2 API */ public class PartTypeImpl implements PartType { private String name; private Class classRef; private Category category; public PartTypeImpl(String name, Class classRef, Category category) { this.name = name; this.classRef = classRef; this.category = category; } public PartImpl newInstance() { Constructor constructor; try { constructor = classRef.getConstructor(); return constructor.newInstance(); } catch (Exception e) { Logger.getGlobal().log(Level.SEVERE, "constructor call failed", e); System.exit(-1); } return null; }