Groovy Documentation

## org.codehaus.groovy.ast.expr
[Java] Class GStringExpression

    java.lang.Object
      org.codehaus.groovy.ast.ASTNode
          org.codehaus.groovy.ast.AnnotatedNode
              org.codehaus.groovy.ast.expr.Expression
                  org.codehaus.groovy.ast.expr.GStringExpression

    public class GStringExpression
    extends Expression

Represents a String expression which contains embedded values inside it such as "hello there ${user} how are you" which is expanded lazily

Authors:
  James Strachan

Version:
  \$Revision\$

Constructor Summary
`GStringExpression(java.lang.String verbatimText)`
`GStringExpression(java.lang.String verbatimText, java.util.List strings, java.util.List values)`

Method Summary
`void` | `addString(ConstantExpression text)`
`void` | `addValue(Expression value)`
`Expression` | `asConstantString()`
`java.util.List` | `getStrings()`
`java.lang.String` | `getText()`
`Expression` | `getValue(int idx)`
`java.util.List` | `getValues()`
`boolean` | `isConstantString()`
`java.lang.String` | `toString()`
`Expression` | `transformExpression(ExpressionTransformer transformer)`
`void` | `visit(GroovyCodeVisitor visitor)`

Methods inherited from class Expression
getType, setType, transformExpression, transformExpressions, transformExpressions

Methods inherited from class AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic

Methods inherited from class ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### GStringExpression

    public GStringExpression(java.lang.String verbatimText)

### GStringExpression

    public GStringExpression(java.lang.String verbatimText, java.util.List strings, java.util.List values)

Method Detail

### addString

    public void addString(ConstantExpression text)

### addValue

    public void addValue(Expression value)

### asConstantString

    public Expression asConstantString()

### getStrings

    public java.util.List getStrings()

### getText

    public java.lang.String getText()

### getValue

    public Expression getValue(int idx)

### getValues

    public java.util.List getValues()

### isConstantString

    public boolean isConstantString()

### toString

    public java.lang.String toString()

### transformExpression

    public Expression transformExpression(ExpressionTransformer transformer)

### visit

    public void visit(GroovyCodeVisitor visitor)

Groovy Documentation