Interface CodeBlock.FormattingOptions
- Enclosing class:
CodeBlock
public static interface CodeBlock.FormattingOptions
Strategy interface to customize formatting of generated code block.
- Author:
- Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionReturn the code that represents an array annotation attribute value for the specified values.classReference(ClassName className) Return the code that represents a reference to the specifiedClassName.default CodeBlocknestedAnnotation(ClassName className) Return the code that starts an annotation used as an attribute value of another annotation.Return the separator to use to end a statement.
-
Method Details
-
statementSeparator
String statementSeparator()Return the separator to use to end a statement.- Returns:
- the statement separator
-
arrayOf
Return the code that represents an array annotation attribute value for the specified values. Implementations may omit the array syntax for a single value if the language allows it.- Parameters:
values- the values of the array- Returns:
- the code for the specified values
-
classReference
-
nestedAnnotation
Return the code that starts an annotation used as an attribute value of another annotation. For instance with java, a nestedcom.example.Testannotation would start with@Test.- Parameters:
className- the class name of the nested annotation- Returns:
- the start of the nested annotation
-