Docs & Rules

INRIA/spoonGitHubLast refreshed Oct 3, 2026

This is a public, read-only report. Striff reads this repository's docs, turns each sentence that makes a claim about the code into a rule, and checks the rule against the code on the default branch. How this works

master9abc4c0listed 7h ago

Is this yours? Install to manage it

Once installed, Striff checks every pull request.

41
41
1
5
1
14
1
2
7
2
5
2
1
31 docs, listed Oct 3
INRIA/spoonOpen repository

INRIA/spoon — documented rules

41 of 41 rules, printed October 3, 2026.

The sentence in your docs
Read Oct 2
Concretely, this is translated as an interface CtInvocation ([javadoc](http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/code/CtInvocation.html)) inheriting from both interfaces CtStatement and CtExpression.
CtInvocation extends CtStatement
Holds
Read Oct 2
This class exposes an API to get the content CtComment.getContent(), the type CtComment.getCommentType() and the position CtComment.getPosition() of a comment.
CtComment has a getContent method
Holds
Read Oct 2
This class exposes an API to get the content CtComment.getContent(), the type CtComment.getCommentType() and the position CtComment.getPosition() of a comment.
CtComment has a getCommentType method
Holds
Read Oct 2
This class exposes an API to get the content CtComment.getContent(), the type CtComment.getCommentType() and the position CtComment.getPosition() of a comment.
CtComment has a getPosition method
Holds
Read Oct 2
You can retrieve the comments of each CtElement via the API CtElement.getComments() which returns a List<CtComment>.
CtElement has a getComments method
HoldsPR #6884 · Sep 30
Read Oct 2
The Javadoc comments are also available via the API CtElement.getDocComment() but this API returns directly the content of the Javadoc as String.
CtElement has a getDocComment method
HoldsPR #6884 · Sep 30
Read Oct 2
The idea is to configure DefaultJavaPrettyPrinter with an appropriate TokenWriter.
DefaultJavaPrettyPrinter depends on TokenWriter
Holds
Read Oct 2
A Filter defines a predicate of the form of a matches method that returns true if an element has to be selected in the filtering operation.
Filter has a matches method
HoldsPR #6884 · Sep 30
Read Oct 2
A Filter is given as parameter to CtElement#getElement(Filter) (or CtQueryable#filterChildren(Filter)) which implements a depth-first search algorithm.
CtElement depends on Filter
Holds
Read Oct 2
A Filter is given as parameter to CtElement#getElement(Filter) (or CtQueryable#filterChildren(Filter)) which implements a depth-first search algorithm.
CtQueryable depends on Filter
Holds
Read Oct 2
EarlyTerminatingScanner is a specialized Class implementing CtScanner that stops once terminate() has been called.
EarlyTerminatingScanner extends CtScanner
HoldsPR #6884 · Sep 30
Read Oct 2
CtQueryable#map(CtFunction)enables you to give Java 8 lambda as query.
CtQueryable has a map method
Holds
Read Oct 2
CtQueryable#map(CtFunction)enables you to give Java 8 lambda as query.
CtQueryable depends on CtFunction
Holds
Read Oct 2
**Compatibility with existing filters** CtQueryable#filterChildren(Filter) is a filtering query that can be chained:
CtQueryable has a filterChildren method
Holds
Read Oct 2
Method setInput allows you to reuse the same query over multiple inputs.
CtQuery has a setInput method
Holds
Read Oct 2
In such case it makes sense to create unbound query using Factory#createQuery().
Factory has a createQuery method
HoldsPR #6884 · Sep 30
Read Oct 2
Each example above use CtQuery#list() to evaluate the query.
CtQuery has a list method
HoldsPR #6884 · Sep 30
Read Oct 2
There is CtQuery#forEach(CtConsumer), which sends each query result to the CtConsumer#accept function.
CtQuery has a forEach method
Holds
Read Oct 2
There is CtQuery#forEach(CtConsumer), which sends each query result to the CtConsumer#accept function.
CtQuery depends on CtConsumer
Holds
Read Oct 2
There is CtQuery#forEach(CtConsumer), which sends each query result to the CtConsumer#accept function.
CtConsumer has an accept method
Holds
Read Oct 2
Finally there is CtQuery#first(), which evaluates the query until first query result is found.
CtQuery has a first method
HoldsPR #6884 · Sep 30
Read Oct 2
**Warning** The JarLauncher feature (and all features relying on decompilation) are not included in spoon-core but in spoon-decompiler.
JarLauncher is in spoon-decompiler
HoldsPR #6884 · Sep 30
Read Oct 2
instantiate TemplateMatcher and call method find or use it as Filter of a query.
TemplateMatcher has a find method
Holds
Read Oct 2
See roleToSkippedClass in class [ElementNode](https://github.com/INRIA/spoon/blob/master/src/main/java/spoon/pattern/internal/node/ElementNode.java)
ElementNode has roleToSkippedClass
HoldsPR #6884 · Sep 30
Read Oct 2
CtPath ([javadoc](http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/path/CtPath.html)) defines the path to a CtElement ([javadoc](http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/declaration/CtElement.html)) in a model, similarly to XPath for XML.
CtPath depends on CtElement
Holds
Read Oct 2
Method getPath in CtElement returns a path
CtElement has a getPath method
HoldsPR #6884 · Sep 30
Read Oct 2
name(String, String[]) ([javadoc](http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/path/CtPathBuilder.html#name-java.lang.String-java.lang.String:A...-)) adds a name matcher to the current path.
CtPathBuilder has a name method
HoldsPR #6884 · Sep 30
Read Oct 2
type(Class, String[]) ([javadoc](http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/path/CtPathBuilder.html#type-java.lang.Class-java.lang.String:A...-)) matches on element of a given type.
CtPathBuilder has a type method
HoldsPR #6884 · Sep 30
Read Oct 2
role(CtPathRole, String[]) ([javadoc](http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/path/CtPathBuilder.html#role-spoon.reflect.path.CtPathRole-java.lang.String:A...-)) matches on elements by their role (where CtPathRole gives all constants supported).
CtPathBuilder has a role method
HoldsPR #6884 · Sep 30
Read Oct 2
wildcard() ([javadoc](http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/path/CtPathBuilder.html#wildcard--)) matches only on elements child of current one.
CtPathBuilder has a wildcard method
HoldsPR #6884 · Sep 30
Read Oct 2
recursiveWildcard() ([javadoc](http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/path/CtPathBuilder.html#recursiveWildcard--)) matches on any child and sub-children.
CtPathBuilder has a recursiveWildcard method
HoldsPR #6884 · Sep 30
Read Oct 2
The main methods are getMatchingElement and getMatchingElements.
Match has a getMatchingElement method
HoldsPR #6884 · Sep 30
Read Oct 2
The main methods are getMatchingElement and getMatchingElements.
Match has a getMatchingElements method
HoldsPR #6884 · Sep 30
Read Oct 2
To this end, Spoon provides a special kind of processor called AnnotationProcessor whose interface is:
AnnotationProcessor extends Processor
Holds
Read Oct 2
The process method (line 4) receives as arguments both the CtElement and the annotation it carries.
AnnotationProcessor has a process method
Holds
Read Oct 2
The remaining four methods (getProcessedAnnotationTypes, getConsumedAnnotationTypes, inferConsumedAnnotationTypes and shouldBeConsumed) configure the visiting of the AST during annotation processing.
AnnotationProcessor has a getProcessedAnnotationTypes method
Holds
Read Oct 2
The remaining four methods (getProcessedAnnotationTypes, getConsumedAnnotationTypes, inferConsumedAnnotationTypes and shouldBeConsumed) configure the visiting of the AST during annotation processing.
AnnotationProcessor has a getConsumedAnnotationTypes method
Holds
Read Oct 2
The remaining four methods (getProcessedAnnotationTypes, getConsumedAnnotationTypes, inferConsumedAnnotationTypes and shouldBeConsumed) configure the visiting of the AST during annotation processing.
AnnotationProcessor has a shouldBeConsumed method
Holds
Read Oct 2
A template parameter has a special method (named S, for Substitution) that is used as a marker to indicate the places where a template parameter substitution should occur.
TemplateParameter has a S method
Holds
Read Oct 2
For a CtExpression, method S() returns the return type of the expression.
CtExpression has a S method
Holds
Read Oct 2
All methods in this class are named assertThat and take only one argument.
Assert has an assertThat method
Holds
41 rules from 11 docs

See these where the change is. The browser extension puts a pull request's doc findings, and a diagram of what it changed, on the GitHub page itself, so the code and what your docs say about it are side by side.