Package org.cadixdev.lorenz.impl
Class MappingSetImpl
- java.lang.Object
-
- org.cadixdev.lorenz.impl.MappingSetImpl
-
- All Implemented Interfaces:
MappingSet,Reversible<MappingSet,MappingSet>
public class MappingSetImpl extends java.lang.Object implements MappingSet
A basic implementation ofMappingSet.- Since:
- 0.2.0
-
-
Constructor Summary
Constructors Constructor Description MappingSetImpl()MappingSetImpl(MappingSetModelFactory modelFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TopLevelClassMappingcreateTopLevelClassMapping(java.lang.String obfuscatedName, java.lang.String deobfuscatedName)Creates a top-level class mapping with the given obfuscated and de-obfuscated names.CascadingFieldTypeProvidergetFieldTypeProvider()Gets the field type provider in use for this set of mappings.MappingSetModelFactorygetModelFactory()Gets the underlying model factory, that is used to construct the implementation classes for all the models.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.java.util.Collection<TopLevelClassMapping>getTopLevelClassMappings()Gets an immutable collection of all of the top-level class mappings of the mapping set.booleanhasTopLevelClassMapping(java.lang.String obfuscatedName)Establishes whether the mapping set contains a top-level class mapping of the given obfuscated name.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cadixdev.lorenz.MappingSet
addFieldTypeProvider, computeClassMapping, copy, deobfuscate, deobfuscate, deobfuscate, getClassMapping, getOrCreateClassMapping, getOrCreateTopLevelClassMapping, merge, merge, removeFieldTypeProvider, reverse, reverse
-
-
-
-
Constructor Detail
-
MappingSetImpl
public MappingSetImpl()
-
MappingSetImpl
public MappingSetImpl(MappingSetModelFactory modelFactory)
-
-
Method Detail
-
getModelFactory
public MappingSetModelFactory getModelFactory()
Description copied from interface:MappingSetGets the underlying model factory, that is used to construct the implementation classes for all the models.- Specified by:
getModelFactoryin interfaceMappingSet- Returns:
- The model factory
-
getTopLevelClassMappings
public java.util.Collection<TopLevelClassMapping> getTopLevelClassMappings()
Description copied from interface:MappingSetGets an immutable collection of all of the top-level class mappings of the mapping set.- Specified by:
getTopLevelClassMappingsin interfaceMappingSet- Returns:
- The top-level class mappings
-
createTopLevelClassMapping
public TopLevelClassMapping createTopLevelClassMapping(java.lang.String obfuscatedName, java.lang.String deobfuscatedName)
Description copied from interface:MappingSetCreates a top-level class mapping with the given obfuscated and de-obfuscated names.- Specified by:
createTopLevelClassMappingin interfaceMappingSet- Parameters:
obfuscatedName- The obfuscated name of the top-level classdeobfuscatedName- The de-obfuscated name of the top-level class- Returns:
- The top-level class mapping, to allow for chaining
-
getTopLevelClassMapping
public java.util.Optional<TopLevelClassMapping> getTopLevelClassMapping(java.lang.String obfuscatedName)
Description copied from interface:MappingSetGets the top-level class mapping of the given obfuscated name of the class mapping, should it exist.- Specified by:
getTopLevelClassMappingin interfaceMappingSet- Parameters:
obfuscatedName- The obfuscated name of the top-level class mapping- Returns:
- The top-level class mapping, wrapped in an
Optional
-
hasTopLevelClassMapping
public boolean hasTopLevelClassMapping(java.lang.String obfuscatedName)
Description copied from interface:MappingSetEstablishes whether the mapping set contains a top-level class mapping of the given obfuscated name.- Specified by:
hasTopLevelClassMappingin interfaceMappingSet- Parameters:
obfuscatedName- The obfuscated name of the top-level class mapping- Returns:
trueshould a top-level class mapping of the given obfuscated name exist in the mapping set;falseotherwise
-
getFieldTypeProvider
public CascadingFieldTypeProvider getFieldTypeProvider()
Description copied from interface:MappingSetGets the field type provider in use for this set of mappings.- Specified by:
getFieldTypeProviderin interfaceMappingSet- Returns:
- The field type provider
-
-