fix! from ai multi project
This commit is contained in:
@@ -471,12 +471,21 @@ public abstract class AbstractCallGraphEngine implements CallGraphEngine {
|
||||
declaredType = polymorphicEvents.isEmpty() ? null : polymorphicEvents.get(0);
|
||||
} else if (exprNode instanceof SimpleName sn) {
|
||||
varName = sn.getIdentifier();
|
||||
if (varName.equals(varName.toUpperCase()) && varName.contains("_")) {
|
||||
if (varName.equals(varName.toUpperCase())) {
|
||||
polymorphicEvents.add(varName);
|
||||
methodName = null;
|
||||
} else {
|
||||
methodName = "VariableReference";
|
||||
}
|
||||
} else if (exprNode instanceof QualifiedName qn) {
|
||||
polymorphicEvents.add(qn.getFullyQualifiedName());
|
||||
methodName = null;
|
||||
} else if (exprNode instanceof FieldAccess fa) {
|
||||
polymorphicEvents.add(fa.toString());
|
||||
methodName = null;
|
||||
} else if (exprNode instanceof StringLiteral sl) {
|
||||
polymorphicEvents.add(sl.getLiteralValue());
|
||||
methodName = null;
|
||||
} else if (exprNode instanceof ParenthesizedExpression pe &&
|
||||
pe.getExpression() instanceof CastExpression ce &&
|
||||
ce.getExpression() instanceof ClassInstanceCreation cic) {
|
||||
|
||||
Reference in New Issue
Block a user