Interface IMapping<TMapping>

Type Parameters:
TMapping - type of this member, for transformation method return types
All Known Implementing Classes:
MappingField, MappingFieldSrg, MappingMethod

public interface IMapping<TMapping>
Base class for member mapping entries
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Type of mapping
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a clone of this mapping
    Get the descriptor of this member, for example the method descriptor or field type.
    Get the mapping name, for method mappings this includes the owner
    Get the owner of this member, for fields and methods this is the class name, for classes it is the package name, for packages it is undefined.
    Get the base name of this member, for example the bare field, method or class name
    Get the next most immediate super-implementation of this mapping.
    Get the mapping type (field, method, class, package)
    move(String newOwner)
    Create a clone of this mapping with a new owner
    remap(String newName)
    Create a clone of this mapping with a new name
    Get a representation of this mapping for serialisation.
    transform(String newDesc)
    Create a clone of this mapping with a new descriptor
  • Method Details

    • getType

      IMapping.Type getType()
      Get the mapping type (field, method, class, package)
    • move

      TMapping move(String newOwner)
      Create a clone of this mapping with a new owner
      Parameters:
      newOwner - new owner
      Returns:
      cloned mapping
    • remap

      TMapping remap(String newName)
      Create a clone of this mapping with a new name
      Parameters:
      newName - new name
      Returns:
      cloned mapping
    • transform

      TMapping transform(String newDesc)
      Create a clone of this mapping with a new descriptor
      Parameters:
      newDesc - new descriptor
      Returns:
      cloned mapping
    • copy

      TMapping copy()
      Create a clone of this mapping
      Returns:
      cloned mapping
    • getName

      String getName()
      Get the mapping name, for method mappings this includes the owner
      Returns:
      the mapping name, includes the owner for method mappings
    • getSimpleName

      String getSimpleName()
      Get the base name of this member, for example the bare field, method or class name
      Returns:
      the base name of this mapping
    • getOwner

      String getOwner()
      Get the owner of this member, for fields and methods this is the class name, for classes it is the package name, for packages it is undefined. Can return null.
      Returns:
      the parent of this mapping
    • getDesc

      String getDesc()
      Get the descriptor of this member, for example the method descriptor or field type. For classes and packages this is undefined. Can return null since not all mapping types support descriptors.
      Returns:
      the mapping descriptor
    • getSuper

      TMapping getSuper()
      Get the next most immediate super-implementation of this mapping. For example if the mapping is a method and the method overrides a method in the immediate superclass, return that method. Can return null if no superclass is available or if no superclass definition exists.
      Returns:
      the method immediately overridden by this method, or null if not present or not resolvable
    • serialise

      String serialise()
      Get a representation of this mapping for serialisation. Individual writers are free to use their own mappings, this method is for convenience only.
      Returns:
      string representation of this mapping