Interface ClassMapping<M extends ClassMapping,​P>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.util.Optional<FieldMapping> computeFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
      Attempts to locate a field mapping for the given obfuscated field signature.
      default FieldMapping createFieldMapping​(java.lang.String obfuscatedName)
      Creates a new field mapping, attached to this class mapping, using the given obfuscated name.
      default FieldMapping createFieldMapping​(java.lang.String obfuscatedName, java.lang.String deobfuscatedName)
      Creates a new field mapping, attached to this class mapping, using the given obfuscated and de-obfuscated name.
      default FieldMapping createFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
      Creates a new field mapping, attached to this class mapping, using the given obfuscated name.
      FieldMapping createFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature, java.lang.String deobfuscatedName)
      Creates a new field mapping, attached to this class mapping, using the given signature and de-obfuscated name.
      default InnerClassMapping createInnerClassMapping​(java.lang.String obfuscatedName)
      Creates a new inner class mapping, attached to this class mapping, using the given obfuscated class name.
      InnerClassMapping createInnerClassMapping​(java.lang.String obfuscatedName, java.lang.String deobfuscatedName)
      Creates a new inner class mapping, attached to this class mapping, using the given obfuscated and de-obfuscated class name.
      default MethodMapping createMethodMapping​(java.lang.String obfuscatedName, java.lang.String obfuscatedDescriptor)
      Creates a new method mapping, attached to this class mapping, using the given obfuscated method name and descriptor.
      default MethodMapping createMethodMapping​(java.lang.String obfuscatedName, org.cadixdev.bombe.type.MethodDescriptor obfuscatedDescriptor)
      Creates a new method mapping, attached to this class mapping, using the given obfuscated method name and descriptor.
      default MethodMapping createMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature)
      Creates a new method mapping, attached to this class mapping, using the given method signature.
      MethodMapping createMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature, java.lang.String deobfuscatedName)
      Creates a new method mapping, attached to this class mapping, using the given method signature and de-obfuscated name.
      java.lang.String getDeobfuscatedPackage()
      Gets the de-obfuscated package name of this class mapping.
      java.util.Optional<FieldMapping> getFieldMapping​(java.lang.String obfuscatedName)
      Gets a field mapping of the given obfuscated name of the class mapping, should it exist.
      java.util.Optional<FieldMapping> getFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
      Gets the field mapping of the given signature of the class mapping, should it exist.
      java.util.Collection<FieldMapping> getFieldMappings()
      Gets an immutable collection of all of the field mappings of the class mapping.
      java.util.Map<java.lang.String,​FieldMapping> getFieldsByName()
      Gets an immutable map of all of the field mappings of the class mapping, by the field name.
      java.util.Optional<InnerClassMapping> getInnerClassMapping​(java.lang.String obfuscatedName)
      Gets the inner class mapping of the given obfuscated name of the class mapping, should it exist.
      java.util.Collection<InnerClassMapping> getInnerClassMappings()
      Gets an immutable collection of all of the inner class mappings of the class mapping.
      default java.util.Optional<MethodMapping> getMethodMapping​(java.lang.String obfuscatedName, java.lang.String obfuscatedDescriptor)
      Gets the method mapping of the given method signature of the class mapping, should it exist.
      java.util.Optional<MethodMapping> getMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature)
      Gets the method mapping of the given method signature of the class mapping, should it exist.
      java.util.Collection<MethodMapping> getMethodMappings()
      Gets an immutable collection of all of the method mappings of the class mapping.
      java.lang.String getObfuscatedPackage()
      Gets the obfuscated package name of this class mapping.
      default FieldMapping getOrCreateFieldMapping​(java.lang.String obfuscatedName)
      Gets, or creates should it not exist, a field mapping of the given obfuscated name.
      default FieldMapping getOrCreateFieldMapping​(java.lang.String obfuscatedName, java.lang.String obfuscatedDescriptor)
      Gets, or creates should it not exist, a field mapping of the given signature.
      default FieldMapping getOrCreateFieldMapping​(java.lang.String obfuscatedName, org.cadixdev.bombe.type.FieldType obfuscatedDescriptor)
      Gets, or creates should it not exist, a field mapping of the given signature.
      default FieldMapping getOrCreateFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
      Gets, or creates should it not exist, a field mapping of the given signature.
      default InnerClassMapping getOrCreateInnerClassMapping​(java.lang.String obfuscatedName)
      Gets, or creates should it not exist, a inner class mapping of the given obfuscated name.
      default MethodMapping getOrCreateMethodMapping​(java.lang.String obfuscatedName, java.lang.String obfuscatedDescriptor)
      Gets, or creates should it not exist, a method mapping of the given obfuscated name, and descriptor.
      default MethodMapping getOrCreateMethodMapping​(java.lang.String obfuscatedName, org.cadixdev.bombe.type.MethodDescriptor obfuscatedDescriptor)
      Gets, or creates should it not exist, a method mapping of the given obfuscated name, and descriptor.
      default MethodMapping getOrCreateMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature)
      Gets, or creates should it not exist, a method mapping of the given obfuscated signature.
      java.lang.String getSimpleDeobfuscatedName()
      Gets the unqualified ("simple") de-obfuscated name of the member.
      java.lang.String getSimpleObfuscatedName()
      Gets the unqualified ("simple") obfuscated name of the member.
      default boolean hasFieldMapping​(java.lang.String obfuscatedName)
      Establishes whether the class mapping contains a field mapping of the given obfuscated name.
      boolean hasFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
      Establishes whether the class mapping contains a field mapping of the given signature.
      boolean hasInnerClassMapping​(java.lang.String obfuscatedName)
      Establishes whether the class mapping contains a inner class mapping of the given obfuscated name.
      default boolean hasMappings()
      Establishes whether the class mapping has a de-obfuscation mapping, or has some mappings within it.
      boolean hasMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature)
      Establishes whether the class mapping contains a method mapping of the given obfuscated name.
      default java.util.Optional<org.cadixdev.bombe.analysis.InheritanceProvider.ClassInfo> provideInheritance​(org.cadixdev.bombe.analysis.InheritanceProvider provider, java.lang.Object context)  
      • Methods inherited from interface org.cadixdev.bombe.analysis.InheritanceCompletable

        complete, complete, complete, isComplete
    • Method Detail

      • getSimpleObfuscatedName

        java.lang.String getSimpleObfuscatedName()
        Gets the unqualified ("simple") obfuscated name of the member.
        Specified by:
        getSimpleObfuscatedName in interface Mapping<M extends ClassMapping,​P>
        Returns:
        The simple obfuscated name
        See Also:
        Class.getSimpleName(), Specification
      • getSimpleDeobfuscatedName

        java.lang.String getSimpleDeobfuscatedName()
        Gets the unqualified ("simple") de-obfuscated name of the member.
        Specified by:
        getSimpleDeobfuscatedName in interface Mapping<M extends ClassMapping,​P>
        Returns:
        The simple de-obfuscated name
        See Also:
        Class.getSimpleName(), Specification
      • getObfuscatedPackage

        java.lang.String getObfuscatedPackage()
        Gets the obfuscated package name of this class mapping.

        Default package is represented using an empty string.

        Returns:
        The obfuscated package name
        Since:
        0.4.0
      • getDeobfuscatedPackage

        java.lang.String getDeobfuscatedPackage()
        Gets the de-obfuscated package name of this class mapping.

        Default package is represented using an empty string.

        Returns:
        The de-obfuscated package name
        Since:
        0.4.0
      • getFieldMappings

        java.util.Collection<FieldMapping> getFieldMappings()
        Gets an immutable collection of all of the field mappings of the class mapping.
        Returns:
        The field mappings
      • getFieldsByName

        java.util.Map<java.lang.String,​FieldMapping> getFieldsByName()
        Gets an immutable map of all of the field mappings of the class mapping, by the field name.
        Returns:
        The field mappings by name
        Since:
        0.4.0
      • computeFieldMapping

        java.util.Optional<FieldMapping> computeFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
        Attempts to locate a field mapping for the given obfuscated field signature. Unlike getFieldMapping(FieldSignature) this method will attempt to match the field signature with or without type:

        If FieldSignature.getType() is empty, getFieldMapping(String) is returned. Otherwise, the signature is looked up with type. If that fails, the signature is looked up again without type. Note that it will insert a new FieldMapping with the specified type for caching purposes.

        Parameters:
        signature - The (obfuscated) signature of the field
        Returns:
        The field mapping, wrapped in an Optional
        See Also:
        getFieldMapping(FieldSignature), getFieldMapping(String)
      • createFieldMapping

        FieldMapping createFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature,
                                        java.lang.String deobfuscatedName)
        Creates a new field mapping, attached to this class mapping, using the given signature and de-obfuscated name.
        Parameters:
        signature - The signature of the field
        deobfuscatedName - The de-obfuscated name of the field
        Returns:
        The field mapping
        Since:
        0.4.0
      • createFieldMapping

        default FieldMapping createFieldMapping​(java.lang.String obfuscatedName,
                                                java.lang.String deobfuscatedName)
        Creates a new field mapping, attached to this class mapping, using the given obfuscated and de-obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name of the field
        deobfuscatedName - The de-obfuscated name of the field
        Returns:
        The field mapping
      • createFieldMapping

        default FieldMapping createFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
        Creates a new field mapping, attached to this class mapping, using the given obfuscated name.
        Parameters:
        signature - The signature of the field
        Returns:
        The field mapping
        Since:
        0.4.0
      • createFieldMapping

        default FieldMapping createFieldMapping​(java.lang.String obfuscatedName)
        Creates a new field mapping, attached to this class mapping, using the given obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name of the field
        Returns:
        The field mapping
      • getOrCreateFieldMapping

        default FieldMapping getOrCreateFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
        Gets, or creates should it not exist, a field mapping of the given signature.
        Parameters:
        signature - The signature of the field mapping
        Returns:
        The field mapping
        Since:
        0.4.0
      • getOrCreateFieldMapping

        default FieldMapping getOrCreateFieldMapping​(java.lang.String obfuscatedName)
        Gets, or creates should it not exist, a field mapping of the given obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name of the field mapping
        Returns:
        The field mapping
      • getOrCreateFieldMapping

        default FieldMapping getOrCreateFieldMapping​(java.lang.String obfuscatedName,
                                                     java.lang.String obfuscatedDescriptor)
        Gets, or creates should it not exist, a field mapping of the given signature.
        Parameters:
        obfuscatedName - The obfuscated name of the field mapping
        obfuscatedDescriptor - The obfuscated descriptor of the field mapping
        Returns:
        The field mapping
        Since:
        0.4.0
      • getOrCreateFieldMapping

        default FieldMapping getOrCreateFieldMapping​(java.lang.String obfuscatedName,
                                                     org.cadixdev.bombe.type.FieldType obfuscatedDescriptor)
        Gets, or creates should it not exist, a field mapping of the given signature.
        Parameters:
        obfuscatedName - The obfuscated name of the field mapping
        obfuscatedDescriptor - The obfuscated descriptor of the field mapping
        Returns:
        The field mapping
        Since:
        0.5.1
      • hasFieldMapping

        boolean hasFieldMapping​(org.cadixdev.bombe.type.signature.FieldSignature signature)
        Establishes whether the class mapping contains a field mapping of the given signature.
        Parameters:
        signature - The signature of the field mapping
        Returns:
        true should a field mapping of the given signature exists in the class mapping; false otherwise
        Since:
        0.4.0
      • hasFieldMapping

        default boolean hasFieldMapping​(java.lang.String obfuscatedName)
        Establishes whether the class mapping contains a field mapping of the given obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name of the field mapping
        Returns:
        true should a field mapping of the given obfuscated name exists in the class mapping; false otherwise
      • getMethodMappings

        java.util.Collection<MethodMapping> getMethodMappings()
        Gets an immutable collection of all of the method mappings of the class mapping.
        Returns:
        The method mappings
      • getMethodMapping

        java.util.Optional<MethodMapping> getMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature)
        Gets the method mapping of the given method signature of the class mapping, should it exist.
        Parameters:
        signature - The signature of the method mapping
        Returns:
        The method mapping, wrapped in an Optional
      • getMethodMapping

        default java.util.Optional<MethodMapping> getMethodMapping​(java.lang.String obfuscatedName,
                                                                   java.lang.String obfuscatedDescriptor)
        Gets the method mapping of the given method signature of the class mapping, should it exist.
        Parameters:
        obfuscatedName - The obfuscated name of the method mapping
        obfuscatedDescriptor - The obfuscated descriptor of the method mapping
        Returns:
        The method mapping, wrapped in an Optional
        Since:
        0.5.0
      • createMethodMapping

        MethodMapping createMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature,
                                          java.lang.String deobfuscatedName)
        Creates a new method mapping, attached to this class mapping, using the given method signature and de-obfuscated name.
        Parameters:
        signature - The method signature
        deobfuscatedName - The de-obfuscated name of the method
        Returns:
        The method mapping
      • createMethodMapping

        default MethodMapping createMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature)
        Creates a new method mapping, attached to this class mapping, using the given method signature.
        Parameters:
        signature - The method signature
        Returns:
        The method mapping
      • createMethodMapping

        default MethodMapping createMethodMapping​(java.lang.String obfuscatedName,
                                                  java.lang.String obfuscatedDescriptor)
        Creates a new method mapping, attached to this class mapping, using the given obfuscated method name and descriptor.
        Parameters:
        obfuscatedName - The obfuscated method name
        obfuscatedDescriptor - The obfuscated method descriptor
        Returns:
        The method mapping
      • createMethodMapping

        default MethodMapping createMethodMapping​(java.lang.String obfuscatedName,
                                                  org.cadixdev.bombe.type.MethodDescriptor obfuscatedDescriptor)
        Creates a new method mapping, attached to this class mapping, using the given obfuscated method name and descriptor.
        Parameters:
        obfuscatedName - The obfuscated method name
        obfuscatedDescriptor - The obfuscated method descriptor
        Returns:
        The method mapping
        Since:
        0.5.1
      • getOrCreateMethodMapping

        default MethodMapping getOrCreateMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature)
        Gets, or creates should it not exist, a method mapping of the given obfuscated signature.
        Parameters:
        signature - The signature of the method mapping
        Returns:
        The method mapping
      • getOrCreateMethodMapping

        default MethodMapping getOrCreateMethodMapping​(java.lang.String obfuscatedName,
                                                       java.lang.String obfuscatedDescriptor)
        Gets, or creates should it not exist, a method mapping of the given obfuscated name, and descriptor.
        Parameters:
        obfuscatedName - The obfuscated name of the method mapping
        obfuscatedDescriptor - The obfuscated descriptor of the method mapping
        Returns:
        The method mapping
      • getOrCreateMethodMapping

        default MethodMapping getOrCreateMethodMapping​(java.lang.String obfuscatedName,
                                                       org.cadixdev.bombe.type.MethodDescriptor obfuscatedDescriptor)
        Gets, or creates should it not exist, a method mapping of the given obfuscated name, and descriptor.
        Parameters:
        obfuscatedName - The obfuscated name of the method mapping
        obfuscatedDescriptor - The obfuscated descriptor of the method mapping
        Returns:
        The method mapping
        Since:
        0.5.1
      • hasMethodMapping

        boolean hasMethodMapping​(org.cadixdev.bombe.type.signature.MethodSignature signature)
        Establishes whether the class mapping contains a method mapping of the given obfuscated name.
        Parameters:
        signature - The signature of the method mapping
        Returns:
        true should a method mapping of the given obfuscated name exist in the class mapping; false otherwise
      • getInnerClassMappings

        java.util.Collection<InnerClassMapping> getInnerClassMappings()
        Gets an immutable collection of all of the inner class mappings of the class mapping.
        Returns:
        The inner class mappings
      • getInnerClassMapping

        java.util.Optional<InnerClassMapping> getInnerClassMapping​(java.lang.String obfuscatedName)
        Gets the inner class mapping of the given obfuscated name of the class mapping, should it exist.
        Parameters:
        obfuscatedName - The obfuscated name of the inner class mapping
        Returns:
        The inner class mapping, wrapped in an Optional
      • createInnerClassMapping

        InnerClassMapping createInnerClassMapping​(java.lang.String obfuscatedName,
                                                  java.lang.String deobfuscatedName)
        Creates a new inner class mapping, attached to this class mapping, using the given obfuscated and de-obfuscated class name.
        Parameters:
        obfuscatedName - The obfuscated class name
        deobfuscatedName - The de-obfuscated class name
        Returns:
        The class mapping
      • createInnerClassMapping

        default InnerClassMapping createInnerClassMapping​(java.lang.String obfuscatedName)
        Creates a new inner class mapping, attached to this class mapping, using the given obfuscated class name.
        Parameters:
        obfuscatedName - The obfuscated class name
        Returns:
        The class mapping
      • getOrCreateInnerClassMapping

        default InnerClassMapping getOrCreateInnerClassMapping​(java.lang.String obfuscatedName)
        Gets, or creates should it not exist, a inner class mapping of the given obfuscated name.
        Parameters:
        obfuscatedName - The obfuscated name of the inner class mapping
        Returns:
        The inner class mapping
      • hasInnerClassMapping

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

        default boolean hasMappings()
        Establishes whether the class mapping has a de-obfuscation mapping, or has some mappings within it.
        Returns:
        true if the class mappings has mappings; false otherwise
      • provideInheritance

        default java.util.Optional<org.cadixdev.bombe.analysis.InheritanceProvider.ClassInfo> provideInheritance​(org.cadixdev.bombe.analysis.InheritanceProvider provider,
                                                                                                                 java.lang.Object context)
        Specified by:
        provideInheritance in interface org.cadixdev.bombe.analysis.InheritanceCompletable