Interface CodeBlock.FormattingOptions
- Enclosing class:
- CodeBlock
public static interface CodeBlock.FormattingOptions
Strategy interface to customize formatting of generated code block.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the code that represents an array for the specified values.classReference
(ClassName className) Return the code that represents a reference to the specifiedClassName
.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 for the specified values.- Parameters:
values
- the values of the array- Returns:
- an array defining the specified values
-
classReference
Return the code that represents a reference to the specifiedClassName
. For instance with java, a reference tocom.example.Test
would beTest.class
.- Parameters:
className
- the class name to handle- Returns:
- a class reference to the specified class name
-