META-INF.jqassistant-rules.java8.xml Maven / Gradle / Ivy
<jqa:jqassistant-rules xmlns:jqa="http://www.buschmais.com/jqassistant/core/analysis/rules/schema/v1.0"> <concept id="java8:FunctionalInterface"> <description>Labels functional interfaces (i.e. to be used as lambda expressions) with `FunctionalInterface`.</description> <deprecated>This concept has been replaced by "java:FunctionalInterface".</deprecated> <cypher><![CDATA[ MATCH (i:Java:Interface)-[:DECLARES]->(m:Member:Java:Method {abstract: true}) WITH i, count(m) AS methods WHERE methods = 1 SET i:FunctionalInterface RETURN i AS FunctionInterface ]]></cypher> </concept> <concept id="java8:DefaultMethod"> <description>Labels default methods of interfaces with `Default`.</description> <deprecated>This concept has been replaced by "java:DefaultMethod".</deprecated> <cypher><![CDATA[ MATCH (type:Type:Java:Interface)-[:DECLARES]->(defaultMethod:Java:Method) WHERE NOT exists(defaultMethod.abstract) SET defaultMethod:Default RETURN defaultMethod AS DefaultMethod, type AS Interface ]]></cypher> </concept> <concept id="java8:LambdaMethod"> <description>Labels lambda methods with `Lambda` and creates a relation `DECLARES` from the declaring method.</description> <deprecated>This concept has been replaced by "java:LambdaMethod".</deprecated> <cypher><![CDATA[ MATCH (type:Java:Type)-[:DECLARES]->(lambda:Method) WHERE exists(lambda.synthetic) and exists(lambda.static) and lambda.name starts with("lambda$") SET lambda:Lambda WITH type, lambda MATCH (type)-[:DECLARES]->(method:Method) WHERE method <> lambda and method.firstLineNumber <= lambda.firstLineNumber and method.lastLineNumber >= lambda.lastLineNumber MERGE (method)-[:DECLARES_LAMBDA]->(lambda) RETURN method, collect(lambda) ]]></cypher> </concept> </jqa:jqassistant-rules>