private String getUiBinderName(Object uiBinder) { String uiBinderClassSimpleName = ClassHelper.getSimpleName(uiBinder.getClass()); int separatorIndex = uiBinderClassSimpleName.indexOf('_'); String nameWithoutChapterClassName; if (separatorIndex != -1) { nameWithoutChapterClassName = uiBinderClassSimpleName.substring(separatorIndex); } else { nameWithoutChapterClassName = uiBinderClassSimpleName; } if (nameWithoutChapterClassName.endsWith(IMPL_SUFFIX)) { int finalNameLength = nameWithoutChapterClassName.length() - IMPL_SUFFIX.length(); return nameWithoutChapterClassName.substring(0, finalNameLength); } else { return nameWithoutChapterClassName; } }
/** May be overriden if you want to change the chapter name */ public String getName() { return ClassHelper.getSimpleName(getClass()); }
protected final void addPresentable(Presentable presentable) { addPresentable(presentable, ClassHelper.getSimpleName(presentable.getClass())); }