Package edu.umd.cs.findbugs.bytecode
Class MemberUtils
java.lang.Object
edu.umd.cs.findbugs.bytecode.MemberUtils
Utility to analyze class members.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if the method could be a lambda.static boolean
couldBeLambda
(org.apache.bcel.classfile.Method m) Checks if the method could be a lambda.static boolean
couldBeLambda
(org.apache.bcel.generic.MethodGen m) Checks if the method could be a lambda.static boolean
Checks if the the given method was user-generated.static boolean
isUserGenerated
(org.apache.bcel.classfile.FieldOrMethod m) Checks if the the given method was user-generated.static boolean
isUserGenerated
(org.apache.bcel.generic.FieldGenOrMethodGen m) Checks if the the given method was user-generated.
-
Method Details
-
couldBeLambda
public static boolean couldBeLambda(org.apache.bcel.classfile.Method m) Checks if the method could be a lambda. Notice this is a best-check, since once compiled lambda methods are not univocally distinguishable.- Parameters:
m
- The method to check if it's a lambda- Returns:
- True if this could be a lambda, false otherwise
-
couldBeLambda
Checks if the method could be a lambda. Notice this is a best-check, since once compiled lambda methods are not univocally distinguishable.- Parameters:
m
- The method to check if it's a lambda- Returns:
- True if this could be a lambda, false otherwise
-
couldBeLambda
public static boolean couldBeLambda(org.apache.bcel.generic.MethodGen m) Checks if the method could be a lambda. Notice this is a best-check, since once compiled lambda methods are not univocally distinguishable.- Parameters:
m
- The method to check if it's a lambda- Returns:
- True if this could be a lambda, false otherwise
-
isUserGenerated
public static boolean isUserGenerated(org.apache.bcel.classfile.FieldOrMethod m) Checks if the the given method was user-generated. This takes into account for instance lambda methods, that even though they are marked as "synthetic", they are user-generated, and therefore interesting to analysis.- Parameters:
m
- The field or method to check.- Returns:
- True if the given member is user generated, false otherwise.
-
isUserGenerated
Checks if the the given method was user-generated. This takes into account for instance lambda methods, that even though they are marked as "synthetic", they are user-generated, and therefore interesting to analysis.- Parameters:
m
- The field or method to check.- Returns:
- True if the given member is user generated, false otherwise.
-
isUserGenerated
public static boolean isUserGenerated(org.apache.bcel.generic.FieldGenOrMethodGen m) Checks if the the given method was user-generated. This takes into account for instance lambda methods, that even though they are marked as "synthetic", they are user-generated, and therefore interesting to analysis.- Parameters:
m
- The field or method to check.- Returns:
- True if the given member is user generated, false otherwise.
-