Package org.openrewrite.yaml
Class ChangePropertyKey
- java.lang.Object
-
- org.openrewrite.AbstractSourceVisitor<T>
-
- org.openrewrite.AbstractRefactorVisitor<Yaml>
-
- org.openrewrite.yaml.YamlRefactorVisitor
-
- org.openrewrite.yaml.ChangePropertyKey
-
- All Implemented Interfaces:
org.openrewrite.RefactorVisitor<Yaml>,org.openrewrite.SourceVisitor<Yaml>,YamlSourceVisitor<Yaml>
public class ChangePropertyKey extends YamlRefactorVisitor
When nested YAML mappings are interpreted as dot separated property names, e.g. as Spring Boot interprets application.yml files.
-
-
Field Summary
-
Fields inherited from class org.openrewrite.yaml.YamlRefactorVisitor
formatter
-
-
Constructor Summary
Constructors Constructor Description ChangePropertyKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisIdempotent()voidsetCoalesce(boolean coalesce)voidsetProperty(java.lang.String property)voidsetToProperty(java.lang.String toProperty)org.openrewrite.Validatedvalidate()YamlvisitMappingEntry(Yaml.Mapping.Entry entry)-
Methods inherited from class org.openrewrite.yaml.YamlRefactorVisitor
maybeCoalesceProperties, visitDocument, visitDocuments, visitMapping, visitScalar, visitSequence, visitSequenceEntry
-
Methods inherited from class org.openrewrite.AbstractRefactorVisitor
andThen, andThen, next, refactor, refactor, refactor
-
Methods inherited from class org.openrewrite.AbstractSourceVisitor
getCursor, setCursoringOn, visit, visitAfter, visitAfter
-
-
-
-
Method Detail
-
setProperty
public void setProperty(java.lang.String property)
-
setToProperty
public void setToProperty(java.lang.String toProperty)
-
setCoalesce
public void setCoalesce(boolean coalesce)
-
validate
public org.openrewrite.Validated validate()
-
isIdempotent
public boolean isIdempotent()
-
visitMappingEntry
public Yaml visitMappingEntry(Yaml.Mapping.Entry entry)
- Specified by:
visitMappingEntryin interfaceYamlSourceVisitor<Yaml>- Overrides:
visitMappingEntryin classYamlRefactorVisitor
-
-