Открыта возможность инструментации LaunchServer

This commit is contained in:
Gravit 2018-12-20 22:36:02 +07:00
parent df5d3e8020
commit f5534a1f67
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -28,8 +28,16 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
return super.visitFile(file, attrs); return super.visitFile(file, attrs);
} }
} }
public static Instrumentation inst;
private static boolean isStarted = false;
public static boolean isAgentStarted()
{
return isStarted;
}
public static void premain(String agentArgument, Instrumentation inst) { public static void premain(String agentArgument, Instrumentation inst) {
StarterAgent.inst = inst;
isStarted = true;
try { try {
Files.walkFileTree(Paths.get("libraries"), Collections.singleton(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new StarterVisitor(inst)); Files.walkFileTree(Paths.get("libraries"), Collections.singleton(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new StarterVisitor(inst));
} catch (IOException e) { } catch (IOException e) {