public interface SourceBuilder
// Imports StringBuilder and appends " StringBuilder foo;\n" to the source code.
builder.addLine(" %s foo;", StringBuilder.class);
| Modifier and Type | Method and Description |
|---|---|
SourceBuilder |
add(String fmt,
Object... args)
Appends formatted text to the source.
|
SourceBuilder |
addLine(String fmt,
Object... args)
Appends a formatted line of code to the source.
|
SourceLevel |
getSourceLevel() |
SourceBuilder add(String fmt, Object... args)
Formatting is done by String.format(java.lang.String, java.lang.Object...), except that:
Package and PackageElement instances use their fully-qualified names
(no "package " prefix).
Class and TypeElement instances use their qualified names where necessary,
or shorter versions if possible.
SourceBuilder addLine(String fmt, Object... args)
Formatting is done by String.format(java.lang.String, java.lang.Object...), except that:
Package and PackageElement instances use their fully-qualified names
(no "package " prefix).
Class and TypeElement instances use their qualified names where
necessary, or shorter versions if possible.
SourceLevel getSourceLevel()
Copyright © 2015 inferred.org. All rights reserved.