Package org.openrewrite.java.spring
Class IsPossibleSpringConfigFile
java.lang.Object
org.openrewrite.TreeVisitor<org.openrewrite.Tree,org.openrewrite.ExecutionContext>
org.openrewrite.java.spring.IsPossibleSpringConfigFile
public class IsPossibleSpringConfigFile
extends org.openrewrite.TreeVisitor<org.openrewrite.Tree,org.openrewrite.ExecutionContext>
A precondition to determine if a file might be a
Spring configuration file.
A file passes the check when it is a YAML or properties source file and either:
- carries a
SourceSetmarker (i.e. it is part of a recognized source set such assrc/main/resources), or - carries a
SpringConfigFilemarker — typically attached byMarkAdditionalSpringConfigFilesfor files that live outside a standard resource layout but should still be treated as Spring configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable org.openrewrite.Treevisit(@Nullable org.openrewrite.Tree tree, org.openrewrite.ExecutionContext ctx) Methods inherited from class org.openrewrite.TreeVisitor
adapt, collect, collect, defaultValue, doAfterVisit, getAfterVisit, getCursor, getLanguage, isAcceptable, isAdaptableTo, noop, postVisit, preVisit, reduce, reduce, reduce, setCursor, stopAfterPreVisit, updateCursor, visit, visit, visitAndCast, visitAndCast, visitMarker, visitMarkers, visitNonNull, visitNonNull, visitorTreeType
-
Constructor Details
-
IsPossibleSpringConfigFile
public IsPossibleSpringConfigFile()
-
-
Method Details
-
visit
public @Nullable org.openrewrite.Tree visit(@Nullable org.openrewrite.Tree tree, org.openrewrite.ExecutionContext ctx) - Overrides:
visitin classorg.openrewrite.TreeVisitor<org.openrewrite.Tree,org.openrewrite.ExecutionContext>
-