mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[ANY] Обновлены модули.
This commit is contained in:
parent
ba361c007a
commit
d9e4b066da
2 changed files with 23 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
2
modules
2
modules
|
@ -1 +1 @@
|
|||
Subproject commit 88bd03c38a2681e997a305e376eb63e446c99a7f
|
||||
Subproject commit f07089a3448c99793f3ecd8c1f8f6c389e49a7a0
|
Loading…
Reference in a new issue