Package jodd.proxetta.impl

Source Code of jodd.proxetta.impl.InvokeProxettaBuilder

// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.

package jodd.proxetta.impl;

import jodd.proxetta.ProxettaBuilder;
import jodd.proxetta.asm.InvokeClassBuilder;
import jodd.proxetta.asm.TargetClassInfoReader;
import jodd.proxetta.asm.WorkData;
import jodd.asm5.ClassReader;

import java.io.InputStream;

/**
* Invocation replacer class processor.
*/
public class InvokeProxettaBuilder extends ProxettaBuilder {

  protected final InvokeProxetta invokeProxetta;

  public InvokeProxettaBuilder(InvokeProxetta invokeProxetta) {
    super(invokeProxetta);
    this.invokeProxetta = invokeProxetta;
  }

  @Override
  public void setTarget(InputStream target) {
    super.setTarget(target);
  }

  @Override
  public void setTarget(String targetName) {
    super.setTarget(targetName);
  }

  @Override
  public void setTarget(Class target) {
    super.setTarget(target);
  }

  /**
   * {@inheritDoc}
   */
  @Override
  protected WorkData process(ClassReader cr, TargetClassInfoReader targetClassInfoReader) {

    InvokeClassBuilder icb = new InvokeClassBuilder(
        destClassWriter,
        invokeProxetta.getAspects(),
        resolveClassNameSuffix(),
        requestedProxyClassName,
        targetClassInfoReader);

    cr.accept(icb, 0);

    return icb.getWorkData();
  }

}
TOP

Related Classes of jodd.proxetta.impl.InvokeProxettaBuilder

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.