public interface MappingSet
TopLevelClassMapping
s, allowing for their creating and
locating any ClassMapping
.Modifier and Type | Method and Description |
---|---|
default MappingSet |
addFieldTypeProvider(FieldTypeProvider fieldTypeProvider)
Adds the given
FieldTypeProvider to this set of mappings. |
default Optional<? extends ClassMapping<?>> |
computeClassMapping(String obfuscatedName)
Attempts to locate a class mapping for the given obfuscated name.
|
static MappingSet |
create()
Creates a mapping set, using the default Lorenz model implementation.
|
static MappingSet |
create(MappingSetModelFactory modelFactory)
Creates a mapping set, using the given model factory.
|
TopLevelClassMapping |
createTopLevelClassMapping(String obfuscatedName,
String deobfuscatedName)
Creates a top-level class mapping with the given obfuscated and de-obfuscated
names.
|
default String |
deobfuscate(me.jamiemansfield.bombe.type.MethodDescriptor descriptor)
Gets the de-obfuscated descriptor of the method.
|
default String |
deobfuscate(me.jamiemansfield.bombe.type.Type type)
Gets the de-obfuscated raw view of the type.
|
default Optional<? extends ClassMapping<?>> |
getClassMapping(String obfuscatedName)
Gets the class mapping of the given obfuscated name.
|
CascadingFieldTypeProvider |
getFieldTypeProvider()
Gets the field type provider in use for this set of mappings.
|
MappingSetModelFactory |
getModelFactory()
Gets the underlying model factory, that is used to construct
the implementation classes for all the models.
|
default ClassMapping<?> |
getOrCreateClassMapping(String obfuscatedName)
Gets, or creates should it not exist, a class mapping, of the given
obfuscated name.
|
default TopLevelClassMapping |
getOrCreateTopLevelClassMapping(String obfuscatedName)
Gets, or creates should it not exist, a top-level class mapping of the
given obfuscated name.
|
Optional<TopLevelClassMapping> |
getTopLevelClassMapping(String obfuscatedName)
Gets the top-level class mapping of the given obfuscated name of the
class mapping, should it exist.
|
Collection<TopLevelClassMapping> |
getTopLevelClassMappings()
Gets an immutable collection of all of the top-level class
mappings of the mapping set.
|
boolean |
hasTopLevelClassMapping(String obfuscatedName)
Establishes whether the mapping set contains a top-level class
mapping of the given obfuscated name.
|
default MappingSet |
removeFieldTypeProvider(FieldTypeProvider fieldTypeProvider)
Removes the given
FieldTypeProvider to this set of mappings. |
static MappingSet create()
static MappingSet create(MappingSetModelFactory modelFactory)
modelFactory
- The model factory to useMappingSetModelFactory getModelFactory()
Collection<TopLevelClassMapping> getTopLevelClassMappings()
TopLevelClassMapping createTopLevelClassMapping(String obfuscatedName, String deobfuscatedName)
obfuscatedName
- The obfuscated name of the top-level classdeobfuscatedName
- The de-obfuscated name of the top-level classOptional<TopLevelClassMapping> getTopLevelClassMapping(String obfuscatedName)
obfuscatedName
- The obfuscated name of the top-level class mappingOptional
default TopLevelClassMapping getOrCreateTopLevelClassMapping(String obfuscatedName)
obfuscatedName
- The obfuscated name of the top-level class mappingboolean hasTopLevelClassMapping(String obfuscatedName)
obfuscatedName
- The obfuscated name of the top-level class
mappingtrue
should a top-level class mapping of the
given obfuscated name exist in the mapping set;
false
otherwisedefault Optional<? extends ClassMapping<?>> getClassMapping(String obfuscatedName)
obfuscatedName
- The obfuscated nameOptional
default Optional<? extends ClassMapping<?>> computeClassMapping(String obfuscatedName)
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.
obfuscatedName
- The obfuscated nameOptional
default ClassMapping<?> getOrCreateClassMapping(String obfuscatedName)
obfuscatedName
- The obfuscated name of the class mappingCascadingFieldTypeProvider getFieldTypeProvider()
default MappingSet addFieldTypeProvider(FieldTypeProvider fieldTypeProvider)
FieldTypeProvider
to this set of mappings.fieldTypeProvider
- The field type providerthis
, for chainingCascadingFieldTypeProvider.add(FieldTypeProvider)
default MappingSet removeFieldTypeProvider(FieldTypeProvider fieldTypeProvider)
FieldTypeProvider
to this set of mappings.fieldTypeProvider
- The field type providerthis
, for chainingCascadingFieldTypeProvider.remove(FieldTypeProvider)
default String deobfuscate(me.jamiemansfield.bombe.type.Type type)
type
- The type to de-obfuscatedefault String deobfuscate(me.jamiemansfield.bombe.type.MethodDescriptor descriptor)
descriptor
- The descriptor to de-obfuscate