Package org.openrewrite.hcl.tree
Class Hcl.Block
java.lang.Object
org.openrewrite.hcl.tree.Hcl.Block
- All Implemented Interfaces:
BodyContent,Expression,Hcl,org.openrewrite.Tree
- Enclosing interface:
- Hcl
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openrewrite.hcl.tree.Hcl
Hcl.Attribute, Hcl.AttributeAccess, Hcl.Binary, Hcl.Block, Hcl.Conditional, Hcl.ConfigFile, Hcl.Empty, Hcl.ForIntro, Hcl.ForObject, Hcl.ForTuple, Hcl.FunctionCall, Hcl.HeredocTemplate, Hcl.Identifier, Hcl.Index, Hcl.Literal, Hcl.ObjectValue, Hcl.Parentheses, Hcl.QuotedTemplate, Hcl.Splat, Hcl.TemplateInterpolation, Hcl.Tuple, Hcl.Unary, Hcl.VariableExpression -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<P> HclacceptHcl(HclVisitor<P> v, P p) @Nullable Hcl.AttributegetAttribute(String attrName) <T> TgetAttributeValue(String attrName) toString()withAttributeValue(String attrName, Object value) Locate an attribute with the given name and set its value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openrewrite.hcl.tree.BodyContent
withPrefixMethods inherited from interface org.openrewrite.hcl.tree.Hcl
accept, getPrefix, isAcceptableMethods inherited from interface org.openrewrite.Tree
cast, getId, getJacksonPolymorphicTypeTag, getMarkers, isScope, print, print, print, printer, printTrimmed, printTrimmed, printTrimmed, safeCast, withId, withMarkers
-
Constructor Details
-
Block
public Block()
-
-
Method Details
-
getAttribute
-
withAttributeValue
Locate an attribute with the given name and set its value.- Parameters:
attrName- The attribute to locate. This assumes there is one and only one.value- The value to set.- Returns:
- This block.
-
getAttributeValue
- Parameters:
attrName- The name of the attribute to look for.- Returns:
- The text value of the attribute matching the provided name, if any.
-
getCoordinates
- Specified by:
getCoordinatesin interfaceExpression
-
acceptHcl
-
toString
-