Examples of MadvocAction


Examples of jodd.madvoc.meta.MadvocAction

            try {
              Class<?> madvocRootPackageClass = ClassLoaderUtil.loadClass(className, actionClass.getClassLoader());

              // class found, find the mapping
              String mapping = StringPool.EMPTY;
              MadvocAction madvocAction = madvocRootPackageClass.getAnnotation(MadvocAction.class);

              if (madvocAction != null) {
                mapping = madvocAction.value();
              }

              // register root package - so not to lookup twice
              madvocConfig.getRootPackages().addRootPackage(packageName, mapping);

              // repeat lookup
              packagePath = rootPackages.findPackagePathForActionPackage(actionPackageName);

              break;
            } catch (ClassNotFoundException ignore) {

              // continue
              int dotNdx = packageName.lastIndexOf('.');
              if (dotNdx == -1) {
                break;
              }

              packageName = packageName.substring(0, dotNdx);

              if (rootPackage != null) {
                // don't go beyond found root package
                if (packageName.equals(rootPackage)) {
                  break;
                }
              }
            }
          }
        }
      }

      rootPackages.registerPackageActionPath(actionPackageName, packagePath);
    }


    // read package-level annotation

    MadvocAction madvocActionAnnotation = actionPackage.getAnnotation(MadvocAction.class);

    String packageActionPath = madvocActionAnnotation != null ? madvocActionAnnotation.value().trim() : null;

    if (StringUtil.isEmpty(packageActionPath)) {
      packageActionPath = null;
    }
View Full Code Here

Examples of jodd.madvoc.meta.MadvocAction

   * <p>
   * If this method returns <code>null</code> class will be ignored.
   */
  protected String readClassActionPath(Class actionClass, String[] actionPathElements) {
    // read annotation
    MadvocAction madvocActionAnnotation = ((Class<?>)actionClass).getAnnotation(MadvocAction.class);
    String classActionPath = madvocActionAnnotation != null ? madvocActionAnnotation.value().trim() : null;
    if (StringUtil.isEmpty(classActionPath)) {
      classActionPath = null;
    }

    String name = actionClass.getSimpleName();
View Full Code Here

Examples of jodd.madvoc.meta.MadvocAction

            try {
              Class<?> madvocRootPackageClass = ClassLoaderUtil.loadClass(className, actionClass.getClassLoader());

              // class found, find the mapping
              String mapping = StringPool.EMPTY;
              MadvocAction madvocAction = madvocRootPackageClass.getAnnotation(MadvocAction.class);

              if (madvocAction != null) {
                mapping = madvocAction.value();
              }

              // register root package - so not to lookup twice
              madvocConfig.getRootPackages().addRootPackage(packageName, mapping);

              // repeat lookup
              packagePath = rootPackages.findPackagePathForActionPackage(actionPackageName);

              break;
            } catch (ClassNotFoundException ignore) {

              // continue
              int dotNdx = packageName.lastIndexOf('.');
              if (dotNdx == -1) {
                break;
              }

              packageName = packageName.substring(0, dotNdx);

              if (rootPackage != null) {
                // don't go beyond found root package
                if (packageName.equals(rootPackage)) {
                  break;
                }
              }
            }
          }
        }
      }

      rootPackages.registerPackageActionPath(actionPackageName, packagePath);
    }


    // read package-level annotation

    MadvocAction madvocActionAnnotation = actionPackage.getAnnotation(MadvocAction.class);

    String packageActionPath = madvocActionAnnotation != null ? madvocActionAnnotation.value().trim() : null;

    if (StringUtil.isEmpty(packageActionPath)) {
      packageActionPath = null;
    }
View Full Code Here

Examples of jodd.madvoc.meta.MadvocAction

   * <p>
   * If this method returns <code>null</code> class will be ignored.
   */
  protected void readClassActionPath(ActionNames actionNames, Class actionClass) {
    // read annotation
    MadvocAction madvocActionAnnotation = ((Class<?>)actionClass).getAnnotation(MadvocAction.class);
    String classActionPath = madvocActionAnnotation != null ? madvocActionAnnotation.value().trim() : null;
    if (StringUtil.isEmpty(classActionPath)) {
      classActionPath = null;
    }

    String name = actionClass.getSimpleName();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.