Package net.fabricmc.classtweaker.impl
Class ClassTweakerImpl
java.lang.Object
net.fabricmc.classtweaker.impl.ClassTweakerImpl
- All Implemented Interfaces:
ClassTweaker,ClassTweakerVisitor
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Map<String, AccessWidenerImpl> (package private) final Map<String, List<InjectedInterfaceImpl>> (package private) StringFields inherited from interface net.fabricmc.classtweaker.api.ClassTweaker
AW_V1, AW_V2, CT_LATEST, CT_V1 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateClassVisitor(int api, @Nullable ClassVisitor classVisitor, @Nullable BiConsumer<String, byte[]> generatedClassConsumer) getAccessWidener(String className) getInjectedInterfaces(String className) The mapping namespace of the current class tweaker.Contains a list of all classes that should be transformed.inthashCode()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, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.classtweaker.api.visitor.ClassTweakerVisitor
visitLineNumber
-
Field Details
-
namespace
String namespace -
accessWideners
-
injectedInterfaces
-
targetClasses
-
classes
-
-
Constructor Details
-
ClassTweakerImpl
public ClassTweakerImpl()
-
-
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
-
createClassVisitor
public ClassVisitor createClassVisitor(int api, @Nullable @Nullable ClassVisitor classVisitor, @Nullable @Nullable BiConsumer<String, byte[]> generatedClassConsumer) - Specified by:
createClassVisitorin interfaceClassTweaker
-
getTargets
Description copied from interface:ClassTweakerContains a list of all classes that should be transformed. This may contain classes (usually parent classes) that do have a direct class tweak to be applied to them.Names are forward-slash separated internal names (i.e. a/b/C$I).
- Specified by:
getTargetsin interfaceClassTweaker
-
getClasses
-
getAccessWidener
- Specified by:
getAccessWidenerin interfaceClassTweaker
-
getAllAccessWideners
- Specified by:
getAllAccessWidenersin interfaceClassTweaker
-
getInjectedInterfaces
- Specified by:
getInjectedInterfacesin interfaceClassTweaker
-
getAllInjectedInterfaces
- Specified by:
getAllInjectedInterfacesin interfaceClassTweaker
-
getNamespace
Description copied from interface:ClassTweakerThe mapping namespace of the current class tweaker.- Specified by:
getNamespacein interfaceClassTweaker- Returns:
- the mappings namespace.
-
hashCode
public int hashCode()
-