Package soj.transformer

Source Code of soj.transformer.RCLPreMain

package soj.transformer;

import java.lang.instrument.Instrumentation;
import java.util.regex.Pattern;
import soj.transformer.TransformationContext;

/**
*
* @author mischael
*/
public class RCLPreMain {

  public static void premain(String agentArgs, Instrumentation inst) {
    TransformationContext context = new TransformationContext();
    String[] patterns = agentArgs.split(",");
    int i = 0;
    for (String p: patterns) {
      p = p.replace(".", "/");
      p = p.replace("*", ".*");
      p = p.replace("?", ".?");

      context.addCheckedClassPattern(Pattern.compile(p));
    }
   
    inst.addTransformer(new Transformer(context));
 
}
TOP

Related Classes of soj.transformer.RCLPreMain

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.