Package org.openrewrite.yaml
Class ChangePropertyKey
- java.lang.Object
-
- org.openrewrite.SourceVisitor<R>
-
- org.openrewrite.yaml.YamlSourceVisitor<Yaml>
-
- org.openrewrite.yaml.YamlRefactorVisitor
-
- org.openrewrite.yaml.ChangePropertyKey
-
- All Implemented Interfaces:
org.openrewrite.RefactorVisitorSupport
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
defaultTo, maybeCoalesceProperties, visitDocument, visitDocuments, visitMapping, visitSequence, visitSequenceEntry
-
Methods inherited from class org.openrewrite.yaml.YamlSourceVisitor
visitScalar
-
Methods inherited from class org.openrewrite.SourceVisitor
andThen, andThen, getCursor, getName, getTags, nextCycle, reduce, setCursoringOn, visit, visit, visitAfter, visitAfter, visitTree
-
-
-
-
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()
- Overrides:
validatein classorg.openrewrite.SourceVisitor<Yaml>
-
isIdempotent
public boolean isIdempotent()
- Overrides:
isIdempotentin classorg.openrewrite.SourceVisitor<Yaml>
-
visitMappingEntry
public Yaml visitMappingEntry(Yaml.Mapping.Entry entry)
- Overrides:
visitMappingEntryin classYamlRefactorVisitor
-
-