Class ImplicitConstructorCleanup
java.lang.Object
net.covers1624.coffeegrinder.bytecode.transform.transformers.ImplicitConstructorCleanup
- All Implemented Interfaces:
TopLevelClassTransformer,Transformer
We have the following cases to deal with:
- Remove calls to super with no arguments. - Nuke anon class passthrough constructors. - Remove constructors which only have a single super call - If there are no other constructors and - If the method is declared as public or the class is an enum - Remove empty static initializersCreated by covers1624 on 26/11/21.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidtransform(ClassDecl cInsn, ClassTransformContext ctx) Transform a top-level class.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.covers1624.coffeegrinder.bytecode.transform.Transformer
getName, stepType
-
Constructor Details
-
ImplicitConstructorCleanup
public ImplicitConstructorCleanup()
-
-
Method Details
-
transform
Description copied from interface:TopLevelClassTransformerTransform a top-level class.All methods have already been fully processed.
All nested/inner/local/anon classes are present and already fully processed.
- Specified by:
transformin interfaceTopLevelClassTransformer- Parameters:
cInsn- The class.ctx- The context.
-
removeRedundantSuperCall
-