All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.aspectj.util.task.MvelRunnable Maven / Gradle / Ivy

Go to download

Scripting extension for AspectJ agent. Allow java bytecode instrumentation at jvm startup by using MVEL expression and execute code from maven artifacts

The newest version!
package org.aspectj.util.task;

import org.aspectj.util.Utils;
import org.mvel2.MVEL;
import org.mvel2.integration.VariableResolverFactory;

import java.io.Serializable;

public class MvelRunnable implements Runnable{

    private final Serializable mvelExpression;
    private VariableResolverFactory variableResolverFactory;

    public MvelRunnable(String mvelScript, VariableResolverFactory variableResolverFactory) {
        mvelExpression = Utils.compileMvelExpression(mvelScript);
        this.variableResolverFactory = variableResolverFactory;
    }

    public void run() {
        MVEL.executeExpression(mvelExpression, variableResolverFactory);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy