Interface MappingResolver


public interface MappingResolver
Helper class for performing mapping resolution.

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
  • Method Details

    • getNamespaces

      Collection<String> getNamespaces()
      Get the list of all available mapping namespaces in the loaded instance.
      Returns:
      The list of all available namespaces.
    • getCurrentRuntimeNamespace

      String getCurrentRuntimeNamespace()
      Get the current namespace being used at runtime.
      Returns:
      the runtime namespace
    • mapClassName

      String mapClassName​(String namespace, String className)
      Map a class name to the mapping currently used at runtime.
      Parameters:
      namespace - the namespace of the provided class name
      className - the provided binary class name
      Returns:
      the mapped class name, or className if no such mapping is present
    • unmapClassName

      String unmapClassName​(String targetNamespace, String className)
      Unmap a class name to the mapping currently used at runtime.
      Parameters:
      targetNamespace - The target namespace for unmapping.
      className - the 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
    • mapFieldName

      String mapFieldName​(String namespace, String owner, String name, String descriptor)
      Map a field name to the mapping currently used at runtime.
      Parameters:
      namespace - the namespace of the provided field name and descriptor
      owner - the binary name of the owner class of the field
      name - the name of the field
      descriptor - the descriptor of the field
      Returns:
      the mapped field name, or name if no such mapping is present
    • mapMethodName

      String mapMethodName​(String namespace, String owner, String name, String descriptor)
      Map a method name to the mapping currently used at runtime.
      Parameters:
      namespace - the namespace of the provided method name and descriptor
      owner - the binary name of the owner class of the method
      name - the name of the method
      descriptor - the descriptor of the method
      Returns:
      the mapped method name, or name if no such mapping is present