14 lines
562 B
Java
14 lines
562 B
Java
package ex2;
|
|
|
|
import ch.usi.dag.disl.annotation.GuardMethod;
|
|
import ch.usi.dag.disl.dynamiccontext.DynamicContext;
|
|
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"));
|
|
}
|
|
}
|