Package org.spongepowered.asm.mixin.refmap

## Class RemappingReferenceMapper

- java.lang.Object
- - org.spongepowered.asm.mixin.refmap.RemappingReferenceMapper

All Implemented Interfaces:
  `IClassReferenceMapper`, `IReferenceMapper`

    public final class RemappingReferenceMapper
    extends java.lang.Object
    implements IClassReferenceMapper, IReferenceMapper

This adapter is designed to apply the same remapping used elsewhere in the development chain (RemapperChain) to reference maps.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.lang.String` `getContext()` Get the current context
`java.lang.String` `getResourceName()` Get the resource name this refmap was loaded from (if available).
`java.lang.String` `getStatus()` Get a user-readable "status" string for this refmap for use in error messages
`boolean` `isDefault()` Get whether this mapper is defaulted.
`static IReferenceMapper` `of​(MixinEnvironment env, IReferenceMapper refMap)` Wrap the specified refmap in a remapping adapter using settings in the supplied environment
`java.lang.String` `remap​(java.lang.String className, java.lang.String reference)` Remap a reference for the specified owning class in the current context
`java.lang.String` `remapClassName​(java.lang.String className, java.lang.String inputClassName)`
`java.lang.String` `remapClassNameWithContext​(java.lang.String context, java.lang.String className, java.lang.String remapped)`
`java.lang.String` `remapWithContext​(java.lang.String context, java.lang.String className, java.lang.String reference)` Remap a reference for the specified owning class in the specified context
`void` `setContext​(java.lang.String context)` Set the current remap context, can be null

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### isDefault

    public boolean isDefault()

Description copied from interface: `IReferenceMapper`
Get whether this mapper is defaulted. Use this flag rather than reference comparison to `ReferenceMapper.DEFAULT_MAPPER` because of classloader shenanigans

Specified by:
  `isDefault` in interface `IReferenceMapper`
Returns:
  true if this mapper is a defaulted mapper

#### getResourceName

    public java.lang.String getResourceName()

Description copied from interface: `IReferenceMapper`
Get the resource name this refmap was loaded from (if available).

Specified by:
  `getResourceName` in interface `IReferenceMapper`
Returns:
  name of the resource

#### getStatus

    public java.lang.String getStatus()

Description copied from interface: `IReferenceMapper`
Get a user-readable "status" string for this refmap for use in error messages

Specified by:
  `getStatus` in interface `IReferenceMapper`
Returns:
  status message

#### getContext

    public java.lang.String getContext()

Description copied from interface: `IReferenceMapper`
Get the current context

Specified by:
  `getContext` in interface `IReferenceMapper`
Returns:
  current context key, can be null

#### setContext

    public void setContext​(java.lang.String context)

Description copied from interface: `IReferenceMapper`
Set the current remap context, can be null

Specified by:
  `setContext` in interface `IReferenceMapper`
Parameters:
  `context` - remap context

#### remap

    public java.lang.String remap​(java.lang.String className,
                                  java.lang.String reference)

Description copied from interface: `IReferenceMapper`
Remap a reference for the specified owning class in the current context

Specified by:
  `remap` in interface `IReferenceMapper`
Parameters:
  `className` - Owner class
  `reference` - Reference to remap
Returns:
  remapped reference, returns original reference if not remapped

#### remapWithContext

    public java.lang.String remapWithContext​(java.lang.String context,
                                             java.lang.String className,
                                             java.lang.String reference)

Description copied from interface: `IReferenceMapper`
Remap a reference for the specified owning class in the specified context

Specified by:
  `remapWithContext` in interface `IReferenceMapper`
Parameters:
  `context` - Remap context to use
  `className` - Owner class
  `reference` - Reference to remap
Returns:
  remapped reference, returns original reference if not remapped

#### of

    public static IReferenceMapper of​(MixinEnvironment env,
                                      IReferenceMapper refMap)

Wrap the specified refmap in a remapping adapter using settings in the supplied environment

Parameters:
  `env` - environment to read configuration from
  `refMap` - refmap to wrap
Returns:
  wrapped refmap or original refmap is srg data is not available

#### remapClassName

    public java.lang.String remapClassName​(java.lang.String className,
                                           java.lang.String inputClassName)

Specified by:
  `remapClassName` in interface `IClassReferenceMapper`

#### remapClassNameWithContext

    public java.lang.String remapClassNameWithContext​(java.lang.String context,
                                                      java.lang.String className,
                                                      java.lang.String remapped)

Specified by:
  `remapClassNameWithContext` in interface `IClassReferenceMapper`