Interface MappingSet

    • Method Detail

      • create

        static MappingSet create()
        Creates a mapping set, using the default Lorenz model implementation.
        Returns:
        The mapping set
        Since:
        0.2.0
      • create

        static MappingSet create​(MappingSetModelFactory modelFactory)
        Creates a mapping set, using the given model factory.
        Parameters:
        modelFactory - The model factory to use
        Returns:
        The mapping set
        Since:
        0.3.0
      • getModelFactory

        MappingSetModelFactory getModelFactory()
        Gets the underlying model factory, that is used to construct the implementation classes for all the models.
        Returns:
        The model factory
      • getTopLevelClassMappings

        java.util.Collection<TopLevelClassMapping> getTopLevelClassMappings()
        Gets an immutable collection of all of the top-level class mappings of the mapping set.
        Returns:
        The top-level class mappings
      • createTopLevelClassMapping

        TopLevelClassMapping createTopLevelClassMapping​(java.lang.String obfuscatedName,
                                                        java.lang.String deobfuscatedName)
        Creates a top-level class mapping with the given obfuscated and de-obfuscated names.
        Parameters:
        obfuscatedName - The obfuscated name of the top-level class
        deobfuscatedName - The de-obfuscated name of the top-level class
        Returns:
        The top-level class mapping, to allow for chaining
      • getTopLevelClassMapping

        java.util.Optional<TopLevelClassMapping> getTopLevelClassMapping​(java.lang.String obfuscatedName)
        Gets the top-level class mapping of the given obfuscated name of the class mapping, should it exist.
        Parameters:
        obfuscatedName - The obfuscated name of the top-level class mapping
        Returns:
        The top-level class mapping, wrapped in an Optional
      • getOrCreateTopLevelClassMapping

        default TopLevelClassMapping getOrCreateTopLevelClassMapping​(java.lang.String obfuscatedName)
        Gets, or creates should it not exist, a top-level class mapping of the given obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name of the top-level class mapping
        Returns:
        The top-level class mapping
      • hasTopLevelClassMapping

        boolean hasTopLevelClassMapping​(java.lang.String obfuscatedName)
        Establishes whether the mapping set contains a top-level class mapping of the given obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name of the top-level class mapping
        Returns:
        true should a top-level class mapping of the given obfuscated name exist in the mapping set; false otherwise
      • getClassMapping

        default java.util.Optional<? extends ClassMapping<?,​?>> getClassMapping​(java.lang.String obfuscatedName)
        Gets the class mapping of the given obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name
        Returns:
        The class mapping, wrapped in an Optional
      • computeClassMapping

        default java.util.Optional<? extends ClassMapping<?,​?>> computeClassMapping​(java.lang.String obfuscatedName)
        Attempts to locate a class mapping for the given obfuscated name.

        This is equivalent to calling getClassMapping(String), except that it will insert a new inner class mapping in case a class mapping for the outer class exists.

        This method exists to simplify remapping, where it is important to keep inner classes a part of the outer class.

        Parameters:
        obfuscatedName - The obfuscated name
        Returns:
        The class mapping, wrapped in an Optional
      • getOrCreateClassMapping

        default ClassMapping<?,​?> getOrCreateClassMapping​(java.lang.String obfuscatedName)
        Gets, or creates should it not exist, a class mapping, of the given obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name of the class mapping
        Returns:
        The class mapping
      • getFieldTypeProvider

        CascadingFieldTypeProvider getFieldTypeProvider()
        Gets the field type provider in use for this set of mappings.
        Returns:
        The field type provider
        Since:
        0.4.0
      • deobfuscate

        default org.cadixdev.bombe.type.Type deobfuscate​(org.cadixdev.bombe.type.Type type)
        Gets the de-obfuscated view of the given type.
        Parameters:
        type - The type to de-obfuscate
        Returns:
        The de-obfuscated type
        Since:
        0.5.0
      • deobfuscate

        default org.cadixdev.bombe.type.FieldType deobfuscate​(org.cadixdev.bombe.type.FieldType type)
        Gets the de-obfuscated view of the given field type.
        Parameters:
        type - The type to de-obfuscate
        Returns:
        The de-obfuscated type
        Since:
        0.5.0
      • deobfuscate

        default org.cadixdev.bombe.type.MethodDescriptor deobfuscate​(org.cadixdev.bombe.type.MethodDescriptor descriptor)
        Gets the de-obfuscated descriptor of the method.
        Parameters:
        descriptor - The descriptor to de-obfuscate
        Returns:
        The de-obfuscated descriptor
        Since:
        0.5.0
      • reverse

        default MappingSet reverse()
        Produces a new mapping set that is a reverse copy of the original.
        Returns:
        The reversed set
        Since:
        0.5.0
      • merge

        default MappingSet merge​(MappingSet with)
        Produces a new mapping set, that is a merged copy with the provided mappings.
        Parameters:
        with - The set to merge with
        Returns:
        The merged set
        Since:
        0.5.0
      • merge

        default MappingSet merge​(MappingSet with,
                                 MappingSet parent)
        Produces a new mapping set, that is a merged copy with the provided mappings.
        Parameters:
        with - The set to merge with
        parent - The set to create entries
        Returns:
        The merged set
        Since:
        0.5.0
      • copy

        default MappingSet copy()
        Produces a new mapping set, which is a clone copy of the original.
        Returns:
        The cloned set
        Since:
        0.5.0