This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
AJP/DiSLProject2022/src-profiler/ex2/IsTriviallyThreadGuard.java
2023-01-07 17:48:53 +01:00

13 lines
508 B
Java

package ex2;
import ch.usi.dag.disl.annotation.GuardMethod;
import ch.usi.dag.disl.staticcontext.ClassStaticContext;
import ch.usi.dag.disl.staticcontext.MethodStaticContext;
public class IsTriviallyThreadGuard {
@GuardMethod
public static boolean isThread(final ClassStaticContext csc, final MethodStaticContext msc) {
return !msc.isMethodStatic() && (csc.getInternalName().equals("java/lang/Thread") ||
csc.getSuperClassInternalName().equals("java/lang/Thread"));
}
}