Class MappingField
java.lang.Object
org.spongepowered.asm.obfuscation.mapping.common.MappingField
- All Implemented Interfaces:
IMapping<MappingField>
- Direct Known Subclasses:
MappingFieldSrg
Stores information about a field mapping during AP runs
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.asm.obfuscation.mapping.IMapping
IMapping.Type -
Constructor Summary
ConstructorsConstructorDescriptionMappingField(String owner, String name) MappingField(String owner, String name, String desc) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a clone of this mappingbooleanfinal StringgetDesc()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 ownerfinal StringgetOwner()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.final StringGet 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)inthashCode()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.toString()Create a clone of this mapping with a new descriptor
-
Constructor Details
-
MappingField
-
MappingField
-
-
Method Details
-
getType
Description copied from interface:IMappingGet the mapping type (field, method, class, package)- Specified by:
getTypein interfaceIMapping<MappingField>
-
getName
Description copied from interface:IMappingGet the mapping name, for method mappings this includes the owner- Specified by:
getNamein interfaceIMapping<MappingField>- Returns:
- the mapping name, includes the owner for method mappings
-
getSimpleName
Description copied from interface:IMappingGet the base name of this member, for example the bare field, method or class name- Specified by:
getSimpleNamein interfaceIMapping<MappingField>- Returns:
- the base name of this mapping
-
getOwner
Description copied from interface:IMappingGet 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.- Specified by:
getOwnerin interfaceIMapping<MappingField>- Returns:
- the parent of this mapping
-
getDesc
Description copied from interface:IMappingGet 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.- Specified by:
getDescin interfaceIMapping<MappingField>- Returns:
- the mapping descriptor
-
getSuper
Description copied from interface:IMappingGet 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.- Specified by:
getSuperin interfaceIMapping<MappingField>- Returns:
- the method immediately overridden by this method, or null if not present or not resolvable
-
move
Description copied from interface:IMappingCreate a clone of this mapping with a new owner- Specified by:
movein interfaceIMapping<MappingField>- Parameters:
newOwner- new owner- Returns:
- cloned mapping
-
remap
Description copied from interface:IMappingCreate a clone of this mapping with a new name- Specified by:
remapin interfaceIMapping<MappingField>- Parameters:
newName- new name- Returns:
- cloned mapping
-
transform
Description copied from interface:IMappingCreate a clone of this mapping with a new descriptor- Specified by:
transformin interfaceIMapping<MappingField>- Parameters:
newDesc- new descriptor- Returns:
- cloned mapping
-
copy
Description copied from interface:IMappingCreate a clone of this mapping- Specified by:
copyin interfaceIMapping<MappingField>- Returns:
- cloned mapping
-
hashCode
public int hashCode() -
equals
-
serialise
Description copied from interface:IMappingGet a representation of this mapping for serialisation. Individual writers are free to use their own mappings, this method is for convenience only.- Specified by:
serialisein interfaceIMapping<MappingField>- Returns:
- string representation of this mapping
-
toString
-