Class Interpolation
java.lang.Object
org.apache.sling.scripting.sightly.impl.compiler.frontend.Interpolation
A sequence with alternating string fragments and HTL expressions. These result from parsing HTML attributes or string nodes. For
instance "Hello ${World}!" would result in 3 fragments: "Hello ", ${World} and "!"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpression(Expression expression) voidaddFragment(Fragment fragment) voidgetFragment(int index) Return the fragment with the specified indexvoidsetContent(String content) intsize()Get the number of fragmentstoString()
-
Constructor Details
-
Interpolation
public Interpolation()
-
-
Method Details
-
addFragment
-
addExpression
-
addText
-
setContent
-
size
public int size()Get the number of fragments- Returns:
- the number of fragments
-
getFragment
Return the fragment with the specified index- Parameters:
index- - the index of the fragments. must be less than the size of the interpolation- Returns:
- - the specified fragment
- Throws:
IndexOutOfBoundsException- - if the index is negative or greater or equal than size
-
getFragments
-
getContent
-
toString
-