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 TypeMethodDescriptionvoid
visitClass
(String name, AccessWidenerReader.AccessType access, boolean transitive) Visits a widened class.void
visitField
(String owner, String name, String descriptor, AccessWidenerReader.AccessType access, boolean transitive) Visits a widened field.void
visitHeader
(String namespace) Visits the header data.void
visitMethod
(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:AccessWidenerVisitor
Visits the header data.- Specified by:
visitHeader
in interfaceAccessWidenerVisitor
- Parameters:
namespace
- the access widener's mapping namespace
-
visitClass
Description copied from interface:AccessWidenerVisitor
Visits a widened class.- Specified by:
visitClass
in interfaceAccessWidenerVisitor
- Parameters:
name
- the name of the classaccess
- the access type (AccessWidenerReader.AccessType.ACCESSIBLE
orAccessWidenerReader.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:AccessWidenerVisitor
Visits a widened method.- Specified by:
visitMethod
in interfaceAccessWidenerVisitor
- Parameters:
owner
- the name of the containing classname
- the name of the methoddescriptor
- the method descriptoraccess
- the access type (AccessWidenerReader.AccessType.ACCESSIBLE
orAccessWidenerReader.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:AccessWidenerVisitor
Visits a widened field.- Specified by:
visitField
in 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.ACCESSIBLE
orAccessWidenerReader.AccessType.MUTABLE
)transitive
- whether this widener should be applied across mod boundaries
-