Quilt Loader 1
Loading...
Searching...
No Matches
org.quiltmc.loader.api.MappingResolver Interface Reference

Helper class for performing mapping resolution. More...

Inheritance diagram for org.quiltmc.loader.api.MappingResolver:
org.quiltmc.loader.impl.util.mappings.LazyMappingResolver org.quiltmc.loader.impl.util.mappings.QuiltMappingResolver

Public Member Functions

Collection< String > getNamespaces ()
 Get the list of all available mapping namespaces in the loaded instance.
String getCurrentRuntimeNamespace ()
 Get the current namespace being used at runtime.
String mapClassName (String fromNamespace, String className)
 Map a class name to the mapping currently used at runtime.
String unmapClassName (String targetNamespace, String className)
 Unmap a class name to the mapping currently used at runtime.
String mapFieldName (String fromNamespace, String owner, String name, String descriptor)
 Map a field name to the mapping currently used at runtime.
String mapMethodName (String fromNamespace, String owner, String name, String descriptor)
 Map a method name to the mapping currently used at runtime.

Detailed Description

Helper class for performing mapping resolution.

This can be obtained through QuiltLoader#getMappingResolver().

Note: The target namespace (the one being mapped to) for mapping (or the source one for unmapping) is always implied to be the one Loader is currently operating in.

All the className used in this resolver are in binary names, such as "mypackage.MyClass$Inner".

Since
0.4.1

Member Function Documentation

◆ getCurrentRuntimeNamespace()

String org.quiltmc.loader.api.MappingResolver.getCurrentRuntimeNamespace ( )

Get the current namespace being used at runtime.

Returns
the runtime namespace

Implemented in org.quiltmc.loader.impl.util.mappings.LazyMappingResolver, and org.quiltmc.loader.impl.util.mappings.QuiltMappingResolver.

◆ getNamespaces()

Collection< String > org.quiltmc.loader.api.MappingResolver.getNamespaces ( )

Get the list of all available mapping namespaces in the loaded instance.

Returns
The list of all available namespaces.

Implemented in org.quiltmc.loader.impl.util.mappings.LazyMappingResolver, and org.quiltmc.loader.impl.util.mappings.QuiltMappingResolver.

◆ mapClassName()

String org.quiltmc.loader.api.MappingResolver.mapClassName ( String fromNamespace,
String className )

Map a class name to the mapping currently used at runtime.

Parameters
fromNamespacethe namespace of the provided class name
classNamethe provided binary class name
Returns
the mapped class name, or className if no such mapping is present

Implemented in org.quiltmc.loader.impl.util.mappings.LazyMappingResolver, and org.quiltmc.loader.impl.util.mappings.QuiltMappingResolver.

◆ mapFieldName()

String org.quiltmc.loader.api.MappingResolver.mapFieldName ( String fromNamespace,
String owner,
String name,
String descriptor )

Map a field name to the mapping currently used at runtime.

Parameters
fromNamespacethe namespace of the provided field name and descriptor
ownerthe binary name of the owner class of the field
namethe name of the field
descriptorthe descriptor of the field
Returns
the mapped field name, or name if no such mapping is present

Implemented in org.quiltmc.loader.impl.util.mappings.LazyMappingResolver, and org.quiltmc.loader.impl.util.mappings.QuiltMappingResolver.

◆ mapMethodName()

String org.quiltmc.loader.api.MappingResolver.mapMethodName ( String fromNamespace,
String owner,
String name,
String descriptor )

Map a method name to the mapping currently used at runtime.

Parameters
fromNamespacethe namespace of the provided method name and descriptor
ownerthe binary name of the owner class of the method
namethe name of the method
descriptorthe descriptor of the method
Returns
the mapped method name, or name if no such mapping is present

Implemented in org.quiltmc.loader.impl.util.mappings.LazyMappingResolver, and org.quiltmc.loader.impl.util.mappings.QuiltMappingResolver.

◆ unmapClassName()

String org.quiltmc.loader.api.MappingResolver.unmapClassName ( String targetNamespace,
String className )

Unmap a class name to the mapping currently used at runtime.

Parameters
targetNamespaceThe target namespace for unmapping.
classNamethe provided binary class name of the mapping form currently used at runtime
Returns
the mapped class name, or className if no such mapping is present

Implemented in org.quiltmc.loader.impl.util.mappings.LazyMappingResolver, and org.quiltmc.loader.impl.util.mappings.QuiltMappingResolver.


The documentation for this interface was generated from the following file:
  • src/main/java/org/quiltmc/loader/api/MappingResolver.java