Interface IMapping<TMapping>
- Type Parameters:
TMapping
- type of this member, for transformation method return types
- All Known Implementing Classes:
MappingField
,MappingFieldSrg
,MappingMethod
public interface IMapping<TMapping>
Base class for member mapping entries
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create a clone of this mappinggetDesc()
Get the descriptor of this member, for example the method descriptor or field type.getName()
Get the mapping name, for method mappings this includes the ownergetOwner()
Get the owner of this member, for fields and methods this is the class name, for classes it is the package name, for packages it is undefined.Get the base name of this member, for example the bare field, method or class namegetSuper()
Get the next most immediate super-implementation of this mapping.getType()
Get the mapping type (field, method, class, package)Create a clone of this mapping with a new ownerCreate a clone of this mapping with a new nameGet a representation of this mapping for serialisation.Create a clone of this mapping with a new descriptor
-
Method Details
-
getType
IMapping.Type getType()Get the mapping type (field, method, class, package) -
move
Create a clone of this mapping with a new owner- Parameters:
newOwner
- new owner- Returns:
- cloned mapping
-
remap
Create a clone of this mapping with a new name- Parameters:
newName
- new name- Returns:
- cloned mapping
-
transform
Create a clone of this mapping with a new descriptor- Parameters:
newDesc
- new descriptor- Returns:
- cloned mapping
-
copy
TMapping copy()Create a clone of this mapping- Returns:
- cloned mapping
-
getName
String getName()Get the mapping name, for method mappings this includes the owner- Returns:
- the mapping name, includes the owner for method mappings
-
getSimpleName
String getSimpleName()Get the base name of this member, for example the bare field, method or class name- Returns:
- the base name of this mapping
-
getOwner
String getOwner()Get the owner of this member, for fields and methods this is the class name, for classes it is the package name, for packages it is undefined. Can return null.- Returns:
- the parent of this mapping
-
getDesc
String getDesc()Get the descriptor of this member, for example the method descriptor or field type. For classes and packages this is undefined. Can return null since not all mapping types support descriptors.- Returns:
- the mapping descriptor
-
getSuper
TMapping getSuper()Get the next most immediate super-implementation of this mapping. For example if the mapping is a method and the method overrides a method in the immediate superclass, return that method. Can return null if no superclass is available or if no superclass definition exists.- Returns:
- the method immediately overridden by this method, or null if not present or not resolvable
-
serialise
String serialise()Get a representation of this mapping for serialisation. Individual writers are free to use their own mappings, this method is for convenience only.- Returns:
- string representation of this mapping
-