aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/mapper/tools/MappingUtils.java
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-09-01 12:09:26 +0200
committer zaaarf <zaaarf@proton.me>2023-09-01 12:09:26 +0200
commitfa6c73faf0ebdaac59a309f7c4bc114a3df99a24 (patch)
tree2fa03aa5e2be18e44725057e8288ef4007621d8f /src/main/java/ftbsc/lll/mapper/tools/MappingUtils.java
parentea030e54b999aba4d8c3409c1507047f0a8aa8c5 (diff)
feat: rewrote the mapper api to make more sense
Diffstat (limited to 'src/main/java/ftbsc/lll/mapper/tools/MappingUtils.java')
-rw-r--r--src/main/java/ftbsc/lll/mapper/tools/MappingUtils.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/ftbsc/lll/mapper/tools/MappingUtils.java b/src/main/java/ftbsc/lll/mapper/tools/MappingUtils.java
index fcc5525..fc121dd 100644
--- a/src/main/java/ftbsc/lll/mapper/tools/MappingUtils.java
+++ b/src/main/java/ftbsc/lll/mapper/tools/MappingUtils.java
@@ -1,7 +1,6 @@
package ftbsc.lll.mapper.tools;
import ftbsc.lll.exceptions.MappingNotFoundException;
-import ftbsc.lll.mapper.IMapper;
import ftbsc.lll.tools.DescriptorBuilder;
import org.objectweb.asm.Type;
@@ -14,11 +13,11 @@ public class MappingUtils {
/**
* Maps a method descriptor, replacing its class references with their mapped counterparts.
* @param descriptor a {@link String} containing the descriptor
- * @param mapper the {@link IMapper} to use for the process
+ * @param mapper the {@link Mapper} to use for the process
* @param reverse if true it uses the inverted mapper rather than the normal one
* @return the mapped descriptor
*/
- public static String mapMethodDescriptor(String descriptor, IMapper mapper, boolean reverse) {
+ public static String mapMethodDescriptor(String descriptor, Mapper mapper, boolean reverse) {
Type method = Type.getMethodType(descriptor);
Type[] arguments = method.getArgumentTypes();
Type returnType = method.getReturnType();
@@ -31,13 +30,13 @@ public class MappingUtils {
}
/**
- * Given a {@link Type} and a valid {@link IMapper} it returns its mapped counterpart.
+ * Given a {@link Type} and a valid {@link Mapper} it returns its mapped counterpart.
* @param type the type in question
- * @param mapper the {@link IMapper} to use for the process
+ * @param mapper the {@link Mapper} to use for the process
* @param reverse if true it uses the inverted mapper rather than the normal one
* @return the mapped type
*/
- public static Type mapType(Type type, IMapper mapper, boolean reverse) {
+ public static Type mapType(Type type, Mapper mapper, boolean reverse) {
//unwrap arrays
Type unwrapped = type;
int arrayLevel = 0;