Package edu.umd.cs.findbugs.util
Class MultiThreadedCodeIdentifierUtils
- java.lang.Object
-
- edu.umd.cs.findbugs.util.MultiThreadedCodeIdentifierUtils
-
public class MultiThreadedCodeIdentifierUtils extends java.lang.ObjectUtility class with methods to identify multithreaded code
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringATOMIC_PACKAGEprivate static java.lang.StringJAVA_LANG_RUNNABLE
-
Constructor Summary
Constructors Modifier Constructor Description privateMultiThreadedCodeIdentifierUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static booleanhasMultiThreadedInstruction(org.apache.bcel.generic.MethodGen methodGen)private static booleanisConcurrentLockInterfaceCall(java.lang.String className, java.lang.String methodName)private static booleanisFieldIndicatingMultiThreadedContainer(org.apache.bcel.classfile.Field field)private static booleanisFromAtomicPackage(java.lang.String signature)private static booleanisInstanceOfLock(java.lang.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 Detail
-
JAVA_LANG_RUNNABLE
private static final java.lang.String JAVA_LANG_RUNNABLE
- See Also:
- Constant Field Values
-
ATOMIC_PACKAGE
private static final java.lang.String ATOMIC_PACKAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isPartOfMultiThreadedCode
public static boolean isPartOfMultiThreadedCode(ClassContext classContext)
-
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 java.lang.String className, java.lang.String methodName)
-
isInstanceOfLock
private static boolean isInstanceOfLock(@DottedClassName java.lang.String className)
-
isFieldIndicatingMultiThreadedContainer
private static boolean isFieldIndicatingMultiThreadedContainer(org.apache.bcel.classfile.Field field)
-
isFromAtomicPackage
private static boolean isFromAtomicPackage(java.lang.String signature)
-
isLocked
public static boolean isLocked(org.apache.bcel.classfile.Method currentMethod, CFG currentCFG, LockDataflow currentLockDataFlow, int pc)
-
isNotThreadSafe
public static boolean isNotThreadSafe(ClassContext classContext)
- Returns:
trueif the class is explicitly annotated withNotThreadSafeto document that it is not thread safe
-
-