// This could be static public void setInstanceNameSpaceParent(Object instance, String className, NameSpace parent) { This ithis = ClassGeneratorUtil.getClassInstanceThis(instance, className); ithis.getNameSpace().setParent(parent); }