Package com.tonic.renamer.mapping
Class FieldMapping
- java.lang.Object
-
- com.tonic.renamer.mapping.FieldMapping
-
- All Implemented Interfaces:
RenameMapping
public final class FieldMapping extends Object implements RenameMapping
Represents a field rename mapping.
-
-
Constructor Summary
Constructors Constructor Description FieldMapping(String owner, String oldName, String descriptor, String newName)Creates a new field mapping.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetDescriptor()StringgetFullyQualifiedName()StringgetNewName()StringgetOldName()StringgetOwner()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
FieldMapping
public FieldMapping(String owner, String oldName, String descriptor, String newName)
Creates a new field mapping.- Parameters:
owner- The internal name of the class owning the field (e.g., "com/example/MyClass")oldName- The old field name (e.g., "data")descriptor- The field descriptor (e.g., "Ljava/lang/String;")newName- The new field name (e.g., "content")
-
-
Method Detail
-
getOwner
public String getOwner()
- Returns:
- the owner
-
getDescriptor
public String getDescriptor()
- Returns:
- the descriptor
-
getOldName
public String getOldName()
- Specified by:
getOldNamein interfaceRenameMapping- Returns:
- the old (original) name being renamed
-
getNewName
public String getNewName()
- Specified by:
getNewNamein interfaceRenameMapping- Returns:
- the new name to rename to
-
getFullyQualifiedName
public String getFullyQualifiedName()
- Returns:
- the field identifier as owner.oldName:descriptor
-
-