Package br.net.woodstock.rockframework.core.util

Examples of br.net.woodstock.rockframework.core.util.LabelSupport


    Enum[] array = Enums.getValues(clazz);
    for (Enum tmp : array) {
      String value = tmp.name();
      String label = null;
      if (tmp instanceof LabelSupport) {
        LabelSupport le = (LabelSupport) tmp;
        label = le.getLabel();
      } else {
        label = tmp.name();
      }
      list.add(new SelectItem(value, label));
    }
View Full Code Here


  @SuppressWarnings("rawtypes")
  public static String getLabel(final Enum e, final String defaultLabel) {
    if (e != null) {
      if (e instanceof LabelSupport) {
        LabelSupport labelSupport = (LabelSupport) e;
        return labelSupport.getLabel();
      }
      return e.name();
    }
    return defaultLabel;
  }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.core.util.LabelSupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.