io.github.kiryu1223.expressionTree.plugin.ExpressionTree Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ExpressionTree Show documentation
Show all versions of ExpressionTree Show documentation
java static expressionTree
package io.github.kiryu1223.expressionTree.plugin;
import com.sun.source.util.JavacTask;
import com.sun.source.util.Plugin;
import com.sun.tools.javac.api.BasicJavacTask;
import io.github.kiryu1223.expressionTree.ext.IExtensionService;
import io.github.kiryu1223.expressionTree.util.JDK;
import java.util.ServiceLoader;
public class ExpressionTree implements Plugin
{
@Override
public String getName()
{
return "ExpressionTree";
}
@Override
public void init(JavacTask task, String... args)
{
JDK.breakSecurity();
BasicJavacTask javacTask = (BasicJavacTask) task;
ExprTreeTaskListener taskListener = new ExprTreeTaskListener(javacTask.getContext());
javacTask.addTaskListener(taskListener);
}
}