Package org.mokai.annotation

Examples of org.mokai.annotation.Name


   * @return a String that is used as the name of the component.
   */
  public static String getComponentName(Object component) {
    Class<?> componentClass = component.getClass();

    Name nameAnnotation = componentClass.getAnnotation(Name.class);
    if (nameAnnotation != null) {
      return nameAnnotation.value();
    }

    return componentClass.getSimpleName();
  }
View Full Code Here


  }

  private static String getName(Class<?> clazz) {
    String name = "";
    if (clazz.isAnnotationPresent(Name.class)) {
      Name nameAnnotation = clazz.getAnnotation(Name.class);
      name = nameAnnotation.value();
    }

    return name;
  }
View Full Code Here

TOP

Related Classes of org.mokai.annotation.Name

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.