Class MultiThreadedCodeIdentifierUtils
java.lang.Object
edu.umd.cs.findbugs.util.MultiThreadedCodeIdentifierUtils
Utility class with methods to identify multithreaded code
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanhasMultiThreadedInstruction(org.apache.bcel.generic.MethodGen methodGen) private static booleanisConcurrentLockInterfaceCall(String className, String methodName) private static booleanisFieldIndicatingMultiThreadedContainer(org.apache.bcel.classfile.Field field) private static booleanisFromAtomicPackage(String signature) private static booleanisInstanceOfLock(String className) static booleanisLocked(org.apache.bcel.classfile.Method currentMethod, CFG currentCFG, LockDataflow currentLockDataFlow, int pc) static booleanisMethodMultiThreaded(org.apache.bcel.classfile.Method method, ClassContext classContext) static booleanisNotThreadSafe(ClassContext classContext) static booleanisPartOfMultiThreadedCode(ClassContext classContext)
-
Field Details
-
JAVA_LANG_RUNNABLE
- See Also:
-
ATOMIC_PACKAGE
- See Also:
-
-
Constructor Details
-
MultiThreadedCodeIdentifierUtils
private MultiThreadedCodeIdentifierUtils()
-
-
Method Details
-
isPartOfMultiThreadedCode
-
isMethodMultiThreaded
public static boolean isMethodMultiThreaded(org.apache.bcel.classfile.Method method, ClassContext classContext) -
hasMultiThreadedInstruction
private static boolean hasMultiThreadedInstruction(org.apache.bcel.generic.MethodGen methodGen) -
isConcurrentLockInterfaceCall
private static boolean isConcurrentLockInterfaceCall(@DottedClassName String className, String methodName) -
isInstanceOfLock
-
isFieldIndicatingMultiThreadedContainer
private static boolean isFieldIndicatingMultiThreadedContainer(org.apache.bcel.classfile.Field field) -
isFromAtomicPackage
-
isLocked
public static boolean isLocked(org.apache.bcel.classfile.Method currentMethod, CFG currentCFG, LockDataflow currentLockDataFlow, int pc) -
isNotThreadSafe
- Returns:
trueif the class is explicitly annotated withNotThreadSafeto document that it is not thread safe
-