Package net.sourceforge.javautil.container.annotation

Examples of net.sourceforge.javautil.container.annotation.Container


  /**
   * @param pojoContainer The pojo container from which to extract a name
   * @return The name of the pojo container
   */
  public static String getPojoContainerName (Object pojoContainer) {
    Container container = pojoContainer.getClass().getAnnotation(Container.class);
    if (container != null && !"".equals(container.name())) {
      return container.name();
    } else {
      if (Proxy.isProxyClass(pojoContainer.getClass())) {
        for (Class<?> iface : pojoContainer.getClass().getInterfaces()) {
          container = iface.getAnnotation(Container.class);
          if (container != null && !"".equals(container.name())) {
            return container.name();
          } else if (container != null) {
            return iface.getSimpleName();
          }
        }
        return "Proxied Container";
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.container.annotation.Container

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.