Package jodd.madvoc.injector

Examples of jodd.madvoc.injector.Target


  /**
   * Initializes action wrapper.
   */
  protected void initializeWrapper(T wrapper) {
    contextInjectorComponent.injectContext(new Target(wrapper));

    wrapper.init();
  }
View Full Code Here


    ActionNamingStrategy namingStrategy;

    try {
      namingStrategy = actionPathNamingStrategy.newInstance();

      contextInjectorComponent.injectContext(new Target(namingStrategy));
    } catch (Exception ex) {
      throw new MadvocException(ex);
    }

    return namingStrategy.buildActionDef(actionClass, actionMethod, actionNames);
View Full Code Here

  /**
   * Initializes action result.
   */
  protected void initializeResult(ActionResult result) {
    contextInjectorComponent.injectContext(new Target(result));

    result.init();
  }
View Full Code Here

  /**
   * Joins action and parameters into one array of Targets.
   */
  protected Target[] makeTargets() {
    if (actionConfig.hasArguments == false) {
      return new Target[] {new Target(action)};
    }

    ActionConfig.MethodParam[] methodParams = actionConfig.getMethodParams();
    Target[] target = new Target[methodParams.length + 1];

    target[0] = new Target(action);

    for (int i = 0; i < methodParams.length; i++) {
      ActionConfig.MethodParam mp = methodParams[i];

      Class type = mp.getType();

      Target t;

      if (mp.getAnnotationType() == null) {
        // parameter is NOT annotated
        t = new Target(createActionMethodArgument(type));
      }
      else if (mp.getAnnotationType() == Out.class) {
        // parameter is annotated with *only* OUT annotation
        // we need to create the output AND to save the type
        t = new Target(createActionMethodArgument(type), type);
      }
      else {
        // parameter is annotated with any IN annotation
        t = new Target(type) {
          @Override
          protected void createValueInstance() {
            value = createActionMethodArgument(type);
          }
        };
View Full Code Here

TOP

Related Classes of jodd.madvoc.injector.Target

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.