Skip to content

Instantly share code, notes, and snippets.

View mickroll's full-sized avatar

Michael Kroll mickroll

View GitHub Profile
@mickroll
mickroll / BeanDefaultConstructorPlugin.java
Last active December 1, 2020 08:07
build plugin for byte-buddy-maven-plugin, enriches bean classfiles with a default constructor. annotations for identifying bean classes are configurable.
package com.github.mickroll.bytebuddy.plugin;
import static net.bytebuddy.matcher.ElementMatchers.is;
import static net.bytebuddy.matcher.ElementMatchers.isAnnotatedWith;
import static net.bytebuddy.matcher.ElementMatchers.isConstructor;
import static net.bytebuddy.matcher.ElementMatchers.isFinal;
import static net.bytebuddy.matcher.ElementMatchers.isPackagePrivate;
import static net.bytebuddy.matcher.ElementMatchers.isProtected;
import static net.bytebuddy.matcher.ElementMatchers.isPublic;
import static net.bytebuddy.matcher.ElementMatchers.isStatic;