Ejemplo n.º 1
0
  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;
    }
  }
Ejemplo n.º 2
0
 /** May be overriden if you want to change the chapter name */
 public String getName() {
   return ClassHelper.getSimpleName(getClass());
 }
Ejemplo n.º 3
0
 protected final void addPresentable(Presentable presentable) {
   addPresentable(presentable, ClassHelper.getSimpleName(presentable.getClass()));
 }