Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.10
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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: 15807 \$

Constructor Summary
`GStringExpression(String verbatimText)`
`GStringExpression(String verbatimText, List strings, List values)`

Method Summary
`void` | `addString(ConstantExpression text)`
`void` | `addValue(Expression value)`
`Expression` | `asConstantString()`
`List` | `getStrings()`
`String` | `getText()`
`Expression` | `getValue(int idx)`
`List` | `getValues()`
`boolean` | `isConstantString()`
`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, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Constructor Detail

### GStringExpression

    public GStringExpression(String verbatimText)

### GStringExpression

    public GStringExpression(String verbatimText, List strings, List values)

Method Detail

### addString

    public void addString(ConstantExpression text)

### addValue

    public void addValue(Expression value)

### asConstantString

    public Expression asConstantString()

### getStrings

    public List getStrings()

### getText

    public String getText()

### getValue

    public Expression getValue(int idx)

### getValues

    public List getValues()

### isConstantString

    public boolean isConstantString()

### toString

    public String toString()

### transformExpression

    public Expression transformExpression(ExpressionTransformer transformer)

### visit

    public void visit(GroovyCodeVisitor visitor)

Copyright © 2003-2010 The Codehaus. All rights reserved.