package com.framsticks.structure; import com.framsticks.util.FramsticksException; public class SideNoteKey { protected final Class type; /** * @param type */ public SideNoteKey(Class type) { this.type = type; } public static SideNoteKey make(Class type) { return new SideNoteKey(type); } public T newValue() { try { return type.newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw new FramsticksException().msg("failed to create side note value").arg("type", type).cause(e); } } }