[ANY] Обновлены модули.

This commit is contained in:
Zaxar163 2019-09-15 19:22:30 +02:00
parent ba361c007a
commit d9e4b066da
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B
2 changed files with 23 additions and 1 deletions

View file

@ -0,0 +1,22 @@
package pro.gravit.launchserver.asm;
import java.io.IOException;
import java.io.InputStream;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.tree.ClassNode;
import pro.gravit.utils.helper.IOHelper;
public final class NodeUtils {
private NodeUtils() { }
public static ClassNode forClass(Class<?> cls, int flags) {
try (InputStream in = cls.getClassLoader().getResourceAsStream(cls.getName().replace('.', '/') + ".class")) {
ClassNode ret = new ClassNode();
new ClassReader(IOHelper.read(in)).accept(ret, flags);
return ret;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}

@ -1 +1 @@
Subproject commit 88bd03c38a2681e997a305e376eb63e446c99a7f Subproject commit f07089a3448c99793f3ecd8c1f8f6c389e49a7a0