/** * Gets the de-obfuscated raw view of the type. * * @param type The type to de-obfuscate * @return The de-obfuscated raw view * @since 0.4.0 */ default String deobfuscate(final Type type) { if (type instanceof ArrayType) { final ArrayType arr = (ArrayType) type; return arr.getDims() + this.deobfuscate(arr.getComponent()); } else if (type instanceof ObjectType) { final ObjectType obj = (ObjectType) type; final Optional<? extends ClassMapping<?>> typeMapping = this.getClassMapping(obj.getClassName()); return "L" + typeMapping.map(Mapping::getFullDeobfuscatedName).orElse(obj.getClassName()) + ";"; } return type.toString(); }