Package org.sonar.java.se.xproc
Class BehaviorCache
- java.lang.Object
-
- org.sonar.java.se.xproc.BehaviorCache
-
public class BehaviorCache extends Object
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,MethodBehavior>
behaviors
-
Constructor Summary
Constructors Constructor Description BehaviorCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
MethodBehavior
get(String signature)
MethodBehavior
get(Symbol.MethodSymbol symbol)
MethodBehavior
methodBehaviorForSymbol(Symbol.MethodSymbol symbol)
MethodBehavior
peek(String signature)
Do not trigger any new computation of method behavior, just check if there is a known method behavior for the symbol.void
setFileContext(SymbolicExecutionVisitor sev)
-
-
-
Field Detail
-
behaviors
public final Map<String,MethodBehavior> behaviors
-
-
Method Detail
-
setFileContext
public void setFileContext(@Nullable SymbolicExecutionVisitor sev)
-
cleanup
public void cleanup()
-
methodBehaviorForSymbol
public MethodBehavior methodBehaviorForSymbol(Symbol.MethodSymbol symbol)
-
get
@CheckForNull public MethodBehavior get(Symbol.MethodSymbol symbol)
-
get
@CheckForNull public MethodBehavior get(String signature)
-
peek
@CheckForNull public MethodBehavior peek(String signature)
Do not trigger any new computation of method behavior, just check if there is a known method behavior for the symbol.- Parameters:
signature
- The targeted method.- Returns:
- null for methods having no computed method behavior yet, or its method behavior, based on source or hardcoded set
-
-