93 lines
2.3 KiB
Java
93 lines
2.3 KiB
Java
package com.codechecker.cache.detector;
|
||
|
||
/**
|
||
* 读侧反序列化类型提示(W06):从 parseObject / getJsonToBean 等推断「缓存 value 被当成什么类型用」。
|
||
* 不单独产生告警,仅用于补强同文件/同 key 写入点的 value 类型。
|
||
*/
|
||
public class CacheReadHint {
|
||
|
||
private String filePath;
|
||
private int lineNumber;
|
||
private String enclosingClass;
|
||
private String enclosingMethod;
|
||
/** 推断出的 key 模式;无法关联 redis get 时为 null */
|
||
private String resolvedKeyPattern;
|
||
private String keyExpression;
|
||
/** value 元素/对象 FQN */
|
||
private String resolvedValueType;
|
||
private boolean rootArray;
|
||
private double confidence = 0.7;
|
||
|
||
public String getFilePath() {
|
||
return filePath;
|
||
}
|
||
|
||
public void setFilePath(String filePath) {
|
||
this.filePath = filePath;
|
||
}
|
||
|
||
public int getLineNumber() {
|
||
return lineNumber;
|
||
}
|
||
|
||
public void setLineNumber(int lineNumber) {
|
||
this.lineNumber = lineNumber;
|
||
}
|
||
|
||
public String getEnclosingClass() {
|
||
return enclosingClass;
|
||
}
|
||
|
||
public void setEnclosingClass(String enclosingClass) {
|
||
this.enclosingClass = enclosingClass;
|
||
}
|
||
|
||
public String getEnclosingMethod() {
|
||
return enclosingMethod;
|
||
}
|
||
|
||
public void setEnclosingMethod(String enclosingMethod) {
|
||
this.enclosingMethod = enclosingMethod;
|
||
}
|
||
|
||
public String getResolvedKeyPattern() {
|
||
return resolvedKeyPattern;
|
||
}
|
||
|
||
public void setResolvedKeyPattern(String resolvedKeyPattern) {
|
||
this.resolvedKeyPattern = resolvedKeyPattern;
|
||
}
|
||
|
||
public String getKeyExpression() {
|
||
return keyExpression;
|
||
}
|
||
|
||
public void setKeyExpression(String keyExpression) {
|
||
this.keyExpression = keyExpression;
|
||
}
|
||
|
||
public String getResolvedValueType() {
|
||
return resolvedValueType;
|
||
}
|
||
|
||
public void setResolvedValueType(String resolvedValueType) {
|
||
this.resolvedValueType = resolvedValueType;
|
||
}
|
||
|
||
public boolean isRootArray() {
|
||
return rootArray;
|
||
}
|
||
|
||
public void setRootArray(boolean rootArray) {
|
||
this.rootArray = rootArray;
|
||
}
|
||
|
||
public double getConfidence() {
|
||
return confidence;
|
||
}
|
||
|
||
public void setConfidence(double confidence) {
|
||
this.confidence = confidence;
|
||
}
|
||
}
|