对我来说,以下概念有效:
<concept id="missingResolves:AddInheritedMethodsToResolvedTypes">
<requiresConcept refId="classpath:ResolveMember"/>
<description>Sometimes the method needed to resolve a method m1 declared in a type t1 is not directly declared in the resolved type t2, but just inherited by t2, then we add this method to t2 (as synthetic-declare).</description>
<cypher><![CDATA[
MATCH (t1:Type)-[:RESOLVES_TO]->(t2:Type), (t1)-[:DECLARES]->(m1:Method)
WHERE NOT (m1)-[:RESOLVES_TO]->()
WITH DISTINCT t2, m1.signature AS methodSignature
MERGE (t2)-[:DECLARES {synthetic: true}]->(m2:Method {signature: methodSignature})
RETURN t2.name as type, methodSignature ORDER BY t2.name, methodSignature
]]></cypher>
</concept>
<concept id="missingResolves:ResolveMethodsUsingInheritedMethodsInResolvedTypes">
<requiresConcept refId="missingResolves:AddInheritedMethodsToResolvedTypes"/>
<description>Uses the synthetic methods added by the "AddInheritedMethodsToResolvedTypes" concept to add missing method resolves.</description>
<cypher><![CDATA[
MATCH (t1:Type)-[:RESOLVES_TO]->(t2:Type), (t1)-[:DECLARES]->(m1:Method)
WHERE NOT (m1)-[:RESOLVES_TO]->()
WITH t1, t2, m1 MATCH (t2)-[:DECLARES {synthetic: true}]->(m2:Method)
WHERE m1.signature = m2.signature
MERGE (m1)-[:RESOLVES_TO {resolved:true}]->(m2)
RETURN count(m1) as ResolvedMethods
]]></cypher>
</concept>
<concept id="missingResolves:ResolveInvokesAgain">
<requiresConcept refId="classpath:ResolveInvokes"/>
<requiresConcept refId="missingResolves:ResolveMethodsUsingInheritedMethodsInResolvedTypes"/>
<description>Resolve method invocations again (same as in original jQAssistant).</description>
<cypher><![CDATA[
MATCH (m:Method)-[i:INVOKES]->(m1:Method)-[:RESOLVES_TO]->(m2:Method)
WHERE NOT (m)-[:INVOKES{lineNumber:i.lineNumber,resolved:true}]->(m2)
MERGE (m)-[:INVOKES{lineNumber:i.lineNumber,resolved:true}]->(m2)
RETURN count(i) as ResolvedInvocations
]]></cypher>
</concept>
<concept id="missingResolves:Correct">
<requiresConcept refId="classpath:Resolve"/>
<requiresConcept refId="missingResolves:ResolveInvokesAgain"/>
<description>Performs a complete corrected resolve.</description>
<cypher><![CDATA[
MATCH ()-[r:RESOLVES_TO]->() RETURN count(r) as ResolvedElements
]]></cypher>
</concept>