Package ftbsc.lll.mapper.utils
Class Mapper
- java.lang.Object
-
- ftbsc.lll.mapper.utils.Mapper
-
public class Mapper extends java.lang.Object
An object containing parsed mapping data, which can apply a conversion as requested.
-
-
Constructor Summary
Constructors Constructor Description Mapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassData
getClassData(java.lang.String name)
Gets theClassData
given the plain name.FieldData
getFieldData(java.lang.String parent, java.lang.String name)
Gets the mapped name of a field.Mapper
getInverted()
Builds a newMapper
that functions in reverse to this one (i.e.MethodData
getMethodData(java.lang.String parent, java.lang.String name, java.lang.String descriptor)
Gets the mapped name of a methodjava.util.Map<java.lang.String,ClassData>
getRawMappings()
Gets the "raw mappings".
-
-
-
Field Detail
-
mappings
protected final java.util.Map<java.lang.String,ClassData> mappings
AMap
tying each plain class name to its class data.
-
-
Method Detail
-
getClassData
public ClassData getClassData(java.lang.String name) throws MappingNotFoundException
Gets theClassData
given the plain name.- Parameters:
name
- the plain internal name of the desired class- Returns:
- the mapped name of the class
- Throws:
MappingNotFoundException
- if no mapping is found
-
getMethodData
public MethodData getMethodData(java.lang.String parent, java.lang.String name, java.lang.String descriptor) throws MappingNotFoundException
Gets the mapped name of a method- Parameters:
parent
- the plain internal name of the parent classname
- the plain method namedescriptor
- the descriptor of the method- Returns:
- the mapped name of the given member
- Throws:
MappingNotFoundException
- if no mapping is found
-
getFieldData
public FieldData getFieldData(java.lang.String parent, java.lang.String name) throws MappingNotFoundException
Gets the mapped name of a field.- Parameters:
parent
- the plain internal name of the parent classname
- the field's plain name- Returns:
- the mapped name of the requested field
- Throws:
MappingNotFoundException
- if no mapping is found
-
getRawMappings
public java.util.Map<java.lang.String,ClassData> getRawMappings()
Gets the "raw mappings".- Returns:
- a
Map
tying eachClassData
to the class' plain name
-
-