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(SquidClassLoader classLoader)BehaviorCache(SquidClassLoader classLoader, boolean crossFileEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()MethodBehaviorget(String signature)MethodBehaviorget(Symbol.MethodSymbol symbol)MethodBehaviormethodBehaviorForSymbol(String signature)MethodBehaviormethodBehaviorForSymbol(Symbol.MethodSymbol symbol)MethodBehaviorpeek(String signature)Do not trigger any new computation of method behavior, just check if there is a known method behavior for the symbol.voidsetFileContext(SymbolicExecutionVisitor sev, Sema semanticModel)
-
-
-
Field Detail
-
behaviors
public final Map<String,MethodBehavior> behaviors
-
-
Constructor Detail
-
BehaviorCache
public BehaviorCache(SquidClassLoader classLoader)
-
BehaviorCache
public BehaviorCache(SquidClassLoader classLoader, boolean crossFileEnabled)
-
-
Method Detail
-
setFileContext
public void setFileContext(@Nullable SymbolicExecutionVisitor sev, @Nullable Sema semanticModel)
-
cleanup
public void cleanup()
-
methodBehaviorForSymbol
public MethodBehavior methodBehaviorForSymbol(Symbol.MethodSymbol symbol)
-
methodBehaviorForSymbol
public MethodBehavior methodBehaviorForSymbol(String signature)
-
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:
symbol- The targeted method.- Returns:
- null for methods having no computed method behavior yet, or its method behavior, based on bytecode or source
-
-