Package org.stianloader.remapper
Class SimpleHierarchyAwareMappingLookup
java.lang.Object
org.stianloader.remapper.HierarchyAwareMappingDelegator<SimpleMappingLookup>
org.stianloader.remapper.SimpleHierarchyAwareMappingLookup
- All Implemented Interfaces:
MappingLookup,MappingSink
public class SimpleHierarchyAwareMappingLookup
extends HierarchyAwareMappingDelegator<SimpleMappingLookup>
A simple implementation of
HierarchyAwareMappingDelegator that uses a SimpleMappingLookup
as a delegate. The inheritance hierarchy is provided by a HierarchyAwareMappingDelegator.TopLevelMemberLookup, which can either be
supplied directly, computed
Thread safety and concurrency
This implementation is not thread-safe as-is due toSimpleMappingLookup not being thread-safe either.
It may be safe to use in a read-only manner within concurrent environments, however it is recommended against doing so.
For more information, read the documentation of SimpleMappingLookup and HierarchyAwareMappingDelegator
as well as the appropriate implementation of HierarchyAwareMappingDelegator.TopLevelMemberLookup (unless you use your own instance it is likely to be
thread-safe, to the extend specified).-
Nested Class Summary
Nested classes/interfaces inherited from class org.stianloader.remapper.HierarchyAwareMappingDelegator
HierarchyAwareMappingDelegator.TopLevelMemberLookup -
Constructor Summary
ConstructorsConstructorDescriptionSimpleHierarchyAwareMappingLookup(@NotNull @Unmodifiable List<@NotNull org.objectweb.asm.tree.ClassNode> nodes) Create aSimpleHierarchyAwareMappingLookupwith an emptySimpleMappingLookup.SimpleHierarchyAwareMappingLookup(@NotNull SimpleMappingLookup delegate, @NotNull HierarchyAwareMappingDelegator.TopLevelMemberLookup topLevelLookup) Generic constructor that takes in aSimpleMappingLookupand aHierarchyAwareMappingDelegator.TopLevelMemberLookup. -
Method Summary
Methods inherited from class org.stianloader.remapper.HierarchyAwareMappingDelegator
getRemappedClassName, getRemappedClassNameFast, getRemappedFieldName, getRemappedMethodName, getRemappedParameterName, remapClass, remapMember, remapParameter
-
Constructor Details
-
SimpleHierarchyAwareMappingLookup
public SimpleHierarchyAwareMappingLookup(@NotNull @NotNull @Unmodifiable List<@NotNull org.objectweb.asm.tree.ClassNode> nodes) Create aSimpleHierarchyAwareMappingLookupwith an emptySimpleMappingLookup. The usedHierarchyAwareMappingDelegator.TopLevelMemberLookupis aSimpleTopLevelLookupwhich is created using the provided list of classnodes. This is mostly a convenience method.JDK Classes or library classes that are irrelevant to the remapping process should be left out for performance (especially memory-related) reasons.
- Parameters:
nodes- The list of nodes to analyze.- See Also:
-
SimpleHierarchyAwareMappingLookup
public SimpleHierarchyAwareMappingLookup(@NotNull @NotNull SimpleMappingLookup delegate, @NotNull @NotNull HierarchyAwareMappingDelegator.TopLevelMemberLookup topLevelLookup) Generic constructor that takes in aSimpleMappingLookupand aHierarchyAwareMappingDelegator.TopLevelMemberLookup. Use this constructor if a specific lookup instance should be reused.- Parameters:
delegate- TheSimpleMappingLookupto which lookup and sink calls are forwarded to.topLevelLookup- TheHierarchyAwareMappingDelegator.TopLevelMemberLookupused by theHierarchyAwareMappingDelegator.
-