com.github.stephenc.definalizer.DefinalizeMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of definalizer-maven-plugin Show documentation
Show all versions of definalizer-maven-plugin Show documentation
An Apache Maven plugin that will definalize final classes
The newest version!
package com.github.stephenc.definalizer;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
/**
* Modifies the bytecode of .class
files to remove the final modifier from the class.
*
* @goal definalize
* @phase process-classes
*/
public final class DefinalizeMojo extends AbstractDefinalizeMojo {
/**
* The directory for compiled classes.
*
* @parameter default-value="${project.build.outputDirectory}"
* @required
* @readonly
*/
private File outputDirectory;
public void execute() throws MojoExecutionException, MojoFailureException {
process(outputDirectory);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy