Package net.fabricmc.accesswidener
Class AccessWidenerRemapper
java.lang.Object
net.fabricmc.accesswidener.AccessWidenerRemapper
- All Implemented Interfaces:
AccessWidenerVisitor
Decorates a
AccessWidenerVisitor with a Remapper
to remap names passing through the visitor if they come from a different namespace.-
Constructor Summary
ConstructorsConstructorDescriptionAccessWidenerRemapper(AccessWidenerVisitor delegate, org.objectweb.asm.commons.Remapper remapper, String fromNamespace, String toNamespace) -
Method Summary
Modifier and TypeMethodDescriptionvoidvisitClass(String name, AccessWidenerReader.AccessType access, boolean transitive) Visits a widened class.voidvisitField(String owner, String name, String descriptor, AccessWidenerReader.AccessType access, boolean transitive) Visits a widened field.voidvisitHeader(String namespace) Visits the header data.voidvisitMethod(String owner, String name, String descriptor, AccessWidenerReader.AccessType access, boolean transitive) Visits a widened method.
-
Constructor Details
-
AccessWidenerRemapper
public AccessWidenerRemapper(AccessWidenerVisitor delegate, org.objectweb.asm.commons.Remapper remapper, String fromNamespace, String toNamespace) - Parameters:
delegate- The visitor to forward the remapped information to.remapper- Will be used to remap names found in the access widener.fromNamespace- The expected namespace of the access widener being remapped. Remapping fails if the actual namespace is different.toNamespace- The namespace that the access widener will be remapped to.
-
-
Method Details
-
visitHeader
Description copied from interface:AccessWidenerVisitorVisits the header data.- Specified by:
visitHeaderin interfaceAccessWidenerVisitor- Parameters:
namespace- the access widener's mapping namespace
-
visitClass
Description copied from interface:AccessWidenerVisitorVisits a widened class.- Specified by:
visitClassin interfaceAccessWidenerVisitor- Parameters:
name- the name of the classaccess- the access type (AccessWidenerReader.AccessType.ACCESSIBLEorAccessWidenerReader.AccessType.EXTENDABLE)transitive- whether this widener should be applied across mod boundaries
-
visitMethod
public void visitMethod(String owner, String name, String descriptor, AccessWidenerReader.AccessType access, boolean transitive) Description copied from interface:AccessWidenerVisitorVisits a widened method.- Specified by:
visitMethodin interfaceAccessWidenerVisitor- Parameters:
owner- the name of the containing classname- the name of the methoddescriptor- the method descriptoraccess- the access type (AccessWidenerReader.AccessType.ACCESSIBLEorAccessWidenerReader.AccessType.EXTENDABLE)transitive- whether this widener should be applied across mod boundaries
-
visitField
public void visitField(String owner, String name, String descriptor, AccessWidenerReader.AccessType access, boolean transitive) Description copied from interface:AccessWidenerVisitorVisits a widened field.- Specified by:
visitFieldin interfaceAccessWidenerVisitor- Parameters:
owner- the name of the containing classname- the name of the fielddescriptor- the type of the field as a type descriptoraccess- the access type (AccessWidenerReader.AccessType.ACCESSIBLEorAccessWidenerReader.AccessType.MUTABLE)transitive- whether this widener should be applied across mod boundaries
-