Package org.cadixdev.lorenz.model
Interface MethodMapping
-
- All Superinterfaces:
Mapping<MethodMapping,ClassMapping>,MemberMapping<MethodMapping,ClassMapping>,Reversible<MethodMapping,ClassMapping>
- All Known Implementing Classes:
MethodMappingImpl
public interface MethodMapping extends MemberMapping<MethodMapping,ClassMapping>
Represents a de-obfuscation mapping for methods.- Since:
- 0.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MethodMappingcopy(ClassMapping parent)Clones this mapping, to a given parent.MethodParameterMappingcreateParameterMapping(int index, java.lang.String deobfuscatedName)Creates aMethodParameterMappingparented by this method, of the given integer index.default java.lang.StringgetDeobfuscatedDescriptor()Gets the de-obfuscated descriptor of the method.default org.cadixdev.bombe.type.signature.MethodSignaturegetDeobfuscatedSignature()Gets the de-obfuscated signature of this method mapping.default org.cadixdev.bombe.type.MethodDescriptorgetDescriptor()Gets theMethodDescriptorof the method.default java.lang.StringgetFullDeobfuscatedName()Gets the fully-qualified de-obfuscated name of the member.default java.lang.StringgetFullObfuscatedName()Gets the fully-qualified obfuscated name of the member.default java.lang.StringgetObfuscatedDescriptor()Gets the obfuscated descriptor of the method.default MethodParameterMappinggetOrCreateParameterMapping(int index)Gets, or creates should it not exist, a parameter mapping of the given integer index.java.util.Optional<MethodParameterMapping>getParameterMapping(int index)Gets aMethodParameterMapping, if present, of the given integer index.java.util.Collection<MethodParameterMapping>getParameterMappings()Gets an immutable view of all theMethodParameterMappings that belong to this method.org.cadixdev.bombe.type.signature.MethodSignaturegetSignature()Gets the signature of this method mapping.default booleanhasMappings()Establishes whether the method mapping has a de-obfuscation mapping, or has some mappings within it.booleanhasParameterMapping(int index)Establishes whether the method mapping contains a parameter mapping of the integer index.default MethodMappingmerge(MethodMapping with, ClassMapping parent)Merges this mapping with another, to a given parent.default MethodMappingreverse(ClassMapping parent)Produces a new object that is a reverse copy of the original.-
Methods inherited from interface org.cadixdev.lorenz.model.Mapping
get, getDeobfuscatedName, getMappings, getObfuscatedName, getOrCreate, getSimpleDeobfuscatedName, getSimpleObfuscatedName, hasDeobfuscatedName, set, setDeobfuscatedName
-
Methods inherited from interface org.cadixdev.lorenz.model.MemberMapping
getParent
-
-
-
-
Method Detail
-
getSignature
org.cadixdev.bombe.type.signature.MethodSignature getSignature()
Gets the signature of this method mapping.- Returns:
- The signature
-
getDeobfuscatedSignature
default org.cadixdev.bombe.type.signature.MethodSignature getDeobfuscatedSignature()
Gets the de-obfuscated signature of this method mapping.- Returns:
- The de-obfuscated signature
- Since:
- 0.5.0
-
getDescriptor
default org.cadixdev.bombe.type.MethodDescriptor getDescriptor()
Gets theMethodDescriptorof the method.- Returns:
- The method descriptor
- See Also:
MethodSignature.getDescriptor()
-
getObfuscatedDescriptor
default java.lang.String getObfuscatedDescriptor()
Gets the obfuscated descriptor of the method.- Returns:
- The obfuscated descriptor
- See Also:
MethodSignature.getDescriptor(),MethodDescriptor.toString()
-
getDeobfuscatedDescriptor
default java.lang.String getDeobfuscatedDescriptor()
Gets the de-obfuscated descriptor of the method.- Returns:
- The de-obfuscated descriptor
- See Also:
MethodSignature.getDescriptor(),MappingSet.deobfuscate(MethodDescriptor)
-
getParameterMappings
java.util.Collection<MethodParameterMapping> getParameterMappings()
Gets an immutable view of all theMethodParameterMappings that belong to this method.- Returns:
- The parameter mappings
- Since:
- 0.4.0
-
createParameterMapping
MethodParameterMapping createParameterMapping(int index, java.lang.String deobfuscatedName)
Creates aMethodParameterMappingparented by this method, of the given integer index.- Parameters:
index- The index of the parameterdeobfuscatedName- The de-obfuscated name to give the parameter- Returns:
- The parameter mapping
- Since:
- 0.4.0
-
getParameterMapping
java.util.Optional<MethodParameterMapping> getParameterMapping(int index)
Gets aMethodParameterMapping, if present, of the given integer index.- Parameters:
index- The index of the parameter- Returns:
- The parameter mapping, wrapped in an
Optional - Since:
- 0.4.0
-
getOrCreateParameterMapping
default MethodParameterMapping getOrCreateParameterMapping(int index)
Gets, or creates should it not exist, a parameter mapping of the given integer index.- Parameters:
index- The index of the parameter- Returns:
- The parameter mapping
- Since:
- 0.4.0
-
hasParameterMapping
boolean hasParameterMapping(int index)
Establishes whether the method mapping contains a parameter mapping of the integer index.- Parameters:
index- The index of the parameter- Returns:
trueshould a parameter mapping of the given index exists in the method mapping;falseotherwise- Since:
- 0.4.0
-
hasMappings
default boolean hasMappings()
Establishes whether the method mapping has a de-obfuscation mapping, or has some mappings within it.- Returns:
trueif the method mappings has mappings;falseotherwise- Since:
- 0.4.0
-
getFullObfuscatedName
default java.lang.String getFullObfuscatedName()
Description copied from interface:MappingGets the fully-qualified obfuscated name of the member.- Specified by:
getFullObfuscatedNamein interfaceMapping<MethodMapping,ClassMapping>- Returns:
- The fully-qualified obfuscated name
-
getFullDeobfuscatedName
default java.lang.String getFullDeobfuscatedName()
Description copied from interface:MappingGets the fully-qualified de-obfuscated name of the member.- Specified by:
getFullDeobfuscatedNamein interfaceMapping<MethodMapping,ClassMapping>- Returns:
- The fully-qualified de-obfuscated name
-
reverse
default MethodMapping reverse(ClassMapping parent)
Description copied from interface:ReversibleProduces a new object that is a reverse copy of the original.- Specified by:
reversein interfaceReversible<MethodMapping,ClassMapping>- Parameters:
parent- The parent object- Returns:
- The reversed object
-
merge
default MethodMapping merge(MethodMapping with, ClassMapping parent)
Description copied from interface:MappingMerges this mapping with another, to a given parent.- Specified by:
mergein interfaceMapping<MethodMapping,ClassMapping>- Parameters:
with- The mapping to merge withparent- The parent- Returns:
- The new mapping
-
copy
default MethodMapping copy(ClassMapping parent)
Description copied from interface:MappingClones this mapping, to a given parent.- Specified by:
copyin interfaceMapping<MethodMapping,ClassMapping>- Parameters:
parent- The parent- Returns:
- The cloned mapping
-
-