Package net.fabricmc.classtweaker.writer
Class ClassTweakerWriterImpl
java.lang.Object
net.fabricmc.classtweaker.writer.ClassTweakerWriterImpl
- All Implemented Interfaces:
ClassTweakerWriter,ClassTweakerVisitor
public final class ClassTweakerWriterImpl
extends Object
implements ClassTweakerVisitor, ClassTweakerWriter
-
Constructor Summary
ConstructorsConstructorDescriptionClassTweakerWriterImpl(int version) Constructs a writer that writes an access widener in the given version. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]visitAccessWidener(String owner) voidvisitHeader(String namespace) Visits the header data.voidvisitInjectedInterface(String owner, String iface, boolean transitive) Visit an injected interface.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.classtweaker.api.visitor.ClassTweakerVisitor
visitLineNumber
-
Constructor Details
-
ClassTweakerWriterImpl
public ClassTweakerWriterImpl(int version) Constructs a writer that writes an access widener in the given version. If features not supported by the version are used, an exception is thrown.
-
-
Method Details
-
visitHeader
Description copied from interface:ClassTweakerVisitorVisits the header data.- Specified by:
visitHeaderin interfaceClassTweakerVisitor- Parameters:
namespace- the access widener's mapping namespace
-
visitAccessWidener
- Specified by:
visitAccessWidenerin interfaceClassTweakerVisitor
-
visitInjectedInterface
Description copied from interface:ClassTweakerVisitorVisit an injected interface.- Specified by:
visitInjectedInterfacein interfaceClassTweakerVisitor- Parameters:
owner- the class name of the class to inject the interface ontoiface- the class name of the interface to inject onto the target class, plus any generics. If generics are present, then this follows the format of JVMS 4.7.9.1ClassTypeSignatures, minus the surroundingLand semicolon.transitive- whether this widener should be applied across mod boundaries
-
getOutput
public byte[] getOutput()- Specified by:
getOutputin interfaceClassTweakerWriter
-
getOutputAsString
- Specified by:
getOutputAsStringin interfaceClassTweakerWriter
-