Examples of addTransformer()


Examples of java.lang.instrument.Instrumentation.addTransformer()

    private EntityManagerFactory createEntityManagerFactory() throws Exception {
        PersistenceClassLoaderHandler persistenceClassLoaderHandler = new PersistenceClassLoaderHandler() {
            public void addTransformer(ClassLoader classLoader, ClassFileTransformer classFileTransformer) {
                Instrumentation instrumentation = Agent.getInstrumentation();
                instrumentation.addTransformer(classFileTransformer);
            }

            public ClassLoader getNewTempClassLoader(ClassLoader classLoader) {
                return new TemporaryClassLoader(classLoader);
            }
View Full Code Here

Examples of java.lang.instrument.Instrumentation.addTransformer()

        @Override
        public void addTransformer(final String unitId, final ClassLoader classLoader, final ClassFileTransformer classFileTransformer) {
            final Instrumentation instrumentation = Agent.getInstrumentation();
            if (instrumentation != null) {
                instrumentation.addTransformer(classFileTransformer);

                if (unitId != null) {
                    List<ClassFileTransformer> transformers = this.transformers.get(unitId);
                    if (transformers == null) {
                        transformers = new ArrayList<ClassFileTransformer>(1);
View Full Code Here

Examples of java.lang.instrument.Instrumentation.addTransformer()

    private static class Handler implements PersistenceClassLoaderHandler {
        public void addTransformer(String unitId, ClassLoader classLoader, ClassFileTransformer classFileTransformer) {
            Instrumentation instrumentation = Agent.getInstrumentation();
            if (instrumentation != null) {
                instrumentation.addTransformer(new Transformer(classFileTransformer));
            }
        }

        public void destroy(String unitId) {
        }
View Full Code Here

Examples of java.lang.instrument.Instrumentation.addTransformer()

        PersistenceClassLoaderHandler persistenceClassLoaderHandler = new PersistenceClassLoaderHandler() {

            public void addTransformer(String unitId, ClassLoader classLoader, ClassFileTransformer classFileTransformer) {
                Instrumentation instrumentation = Agent.getInstrumentation();
                if (instrumentation != null) {
                    instrumentation.addTransformer(new ControllableTransformer(classFileTransformer));
                }
            }

            public void destroy(String unitId) {
            }
View Full Code Here

Examples of java.lang.instrument.Instrumentation.addTransformer()

        private final Map<String,List<ClassFileTransformer>> transformers = new TreeMap<String, List<ClassFileTransformer>> ();

        public void addTransformer(String unitId, ClassLoader classLoader, ClassFileTransformer classFileTransformer) {
            Instrumentation instrumentation = Agent.getInstrumentation();
            if (instrumentation != null) {
                instrumentation.addTransformer(classFileTransformer);

                if (unitId != null) {
                    List<ClassFileTransformer> transformers = this.transformers.get(unitId);
                    if (transformers == null) {
                        transformers = new ArrayList<ClassFileTransformer>(1);
View Full Code Here

Examples of net.minecraftforge.gradle.tasks.ProcessJarTask.addTransformer()

        ProcessJarTask decompDeobf = (ProcessJarTask) project.getTasks().getByName("deobfuscateJar");

        // ATs from the ExtensionObject
        Object[] extAts = getExtension().getAccessTransformers().toArray();
        binDeobf.addTransformer(extAts);
        decompDeobf.addTransformer(extAts);

        // from the resources dirs
        {
            JavaPluginConvention javaConv = (JavaPluginConvention) project.getConvention().getPlugins().get("java");
View Full Code Here

Examples of org.apache.aries.jpa.container.weaving.impl.JPAWeavingHook.addTransformer()

  public void testNotWoven() {
    ServiceReference provider1 = basicProviderSetup(null);
    JPAWeavingHook tr = (JPAWeavingHook) TransformerRegistryFactory.getTransformerRegistry();
    
    //Add a transforme and check it gets called to weave
    tr.addTransformer(b1, ct1a, provider1);
    
    ProtectionDomain pd = new ProtectionDomain(null, null);
    byte[] bytes = new byte[] {(byte) 0xAB, (byte)0xCD};

    WovenClass wc = getWovenClass(b1, "test1", bytes, this.getClass().getClassLoader(),
View Full Code Here

Examples of org.apache.aries.jpa.container.weaving.impl.TransformerRegistry.addTransformer()

  }
 
  public synchronized void addTransformer(ClassTransformer arg0) {
    TransformerRegistry reg = TransformerRegistryFactory.getTransformerRegistry();
    if(reg != null) {
      reg.addTransformer(bundle, arg0, providerRef);
      transformer = arg0;
    }
  }

  public boolean internalExcludeUnlistedClasses() {
View Full Code Here

Examples of org.apache.cocoon.components.pipeline.EventPipeline.addTransformer()

    Parameters params = getParameters(sparams);

//     System.out.println("transform type " + type + ", src " + src
//                        + " params " + params);
   
    eventPipeline.addTransformer(type, src, params);

    return spipeline;
  }

  /**
 
View Full Code Here

Examples of org.apache.cocoon.components.pipeline.ProcessingPipeline.addTransformer()

        Map objectModel = env.getObjectModel();
        ProcessingPipeline pipeline = context.getProcessingPipeline();

        // Perform link translation if requested
        if (objectModel.containsKey(Constants.LINK_OBJECT)) {
            pipeline.addTransformer("<translator>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
        }
       
        if (objectModel.containsKey(Constants.LINK_COLLECTION_OBJECT) && env.isExternal()) {
            pipeline.addTransformer("<gatherer>", null, Parameters.EMPTY_PARAMETERS, Parameters.EMPTY_PARAMETERS);
        }
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.