Docs & rules

INRIA/spoonGitHub

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

master9abc4c0Last read Oct 3

Is this yours? Install to manage it

Once installed, Striff checks every pull request.

Rules summary
Documents
Rules
41
41
1
5
1
14
1
2
7
2
5
2
1
25 docs
INRIA/spoonOpen repository

INRIA/spoon — documented rules

41 of 41 rules, printed November 17, 2026.

The sentence in your docs
Concretely, this is translated as an interface CtInvocation (javadoc) inheriting from both interfaces CtStatement and CtExpression.
CtInvocation extends CtStatement
Holds
This class exposes an API to get the content CtComment.getContent(), the type CtComment.getCommentType() and the position CtComment.getPosition() of a comment.
3 rules from this sentence
CtComment has a getContent method
Holds
CtComment has a getCommentType method
Holds
CtComment has a getPosition method
Holds
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
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
The idea is to configure DefaultJavaPrettyPrinter with an appropriate TokenWriter.
DefaultJavaPrettyPrinter depends on TokenWriter
Holds
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
A Filter is given as parameter to CtElement#getElement(Filter) (or CtQueryable#filterChildren(Filter)) which implements a depth-first search algorithm.
2 rules from this sentence
CtElement depends on Filter
Holds
CtQueryable depends on Filter
Holds
EarlyTerminatingScanner is a specialized Class implementing CtScanner that stops once terminate() has been called.
EarlyTerminatingScanner extends CtScanner
HoldsPR #6884 · Sep 30
CtQueryable#map(CtFunction)enables you to give Java 8 lambda as query.
2 rules from this sentence
CtQueryable depends on CtFunction
Holds
CtQueryable has a map method
Holds
Compatibility with existing filters CtQueryable#filterChildren(Filter) is a filtering query that can be chained:
CtQueryable has a filterChildren method
Holds
Method setInput allows you to reuse the same query over multiple inputs.
CtQuery has a setInput method
Holds
In such case it makes sense to create unbound query using Factory#createQuery().
Factory has a createQuery method
HoldsPR #6884 · Sep 30
Each example above use CtQuery#list() to evaluate the query.
CtQuery has a list method
HoldsPR #6884 · Sep 30
There is CtQuery#forEach(CtConsumer), which sends each query result to the CtConsumer#accept function.
3 rules from this sentence
CtQuery depends on CtConsumer
Holds
CtQuery has a forEach method
Holds
CtConsumer has an accept method
Holds
Finally there is CtQuery#first(), which evaluates the query until first query result is found.
CtQuery has a first method
HoldsPR #6884 · Sep 30
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
instantiate TemplateMatcher and call method find or use it as Filter of a query.
TemplateMatcher has a find method
Holds
See roleToSkippedClass in class ElementNode
ElementNode has roleToSkippedClass
HoldsPR #6884 · Sep 30
CtPath (javadoc) defines the path to a CtElement (javadoc) in a model, similarly to XPath for XML.
CtPath depends on CtElement
Holds
Method getPath in CtElement returns a path
CtElement has a getPath method
HoldsPR #6884 · Sep 30
name(String, String[]) (javadoc) adds a name matcher to the current path.
CtPathBuilder has a name method
HoldsPR #6884 · Sep 30
type(Class, String[]) (javadoc) matches on element of a given type.
CtPathBuilder has a type method
HoldsPR #6884 · Sep 30
role(CtPathRole, String[]) (javadoc) matches on elements by their role (where CtPathRole gives all constants supported).
CtPathBuilder has a role method
HoldsPR #6884 · Sep 30
wildcard() (javadoc) matches only on elements child of current one.
CtPathBuilder has a wildcard method
HoldsPR #6884 · Sep 30
recursiveWildcard() (javadoc) matches on any child and sub-children.
CtPathBuilder has a recursiveWildcard method
HoldsPR #6884 · Sep 30
The main methods are getMatchingElement and getMatchingElements.
2 rules from this sentence
Match has a getMatchingElement method
HoldsPR #6884 · Sep 30
Match has a getMatchingElements method
HoldsPR #6884 · Sep 30
To this end, Spoon provides a special kind of processor called AnnotationProcessor whose interface is:
AnnotationProcessor extends Processor
Holds
The process method (line 4) receives as arguments both the CtElement and the annotation it carries.
AnnotationProcessor has a process method
Holds
The remaining four methods (getProcessedAnnotationTypes, getConsumedAnnotationTypes, inferConsumedAnnotationTypes and shouldBeConsumed) configure the visiting of the AST during annotation processing.
3 rules from this sentence
AnnotationProcessor has a getProcessedAnnotationTypes method
Holds
AnnotationProcessor has a getConsumedAnnotationTypes method
Holds
AnnotationProcessor has a shouldBeConsumed method
Holds
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
For a CtExpression, method S() returns the return type of the expression.
CtExpression has a S method
Holds
All methods in this class are named assertThat and take only one argument.
Assert has an assertThat method
Holds
41 rules from 11 docs

More open-source reports

Every report →

Other public repositories whose docs Striff read and checked against their code.