public final class Snippet extends Object implements HasClassReferences
| Modifier and Type | Class and Description |
|---|---|
static interface |
Writable.Context |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableList<Object> |
args() |
static Snippet |
concat(Iterable<Snippet> snippets)
A snippet that concatenates its arguments.
|
String |
format() |
static Snippet |
format(String format,
Iterable<? extends Object> args) |
static Snippet |
format(String format,
Object... args) |
static Snippet |
join(com.google.common.base.Joiner joiner,
Iterable<Snippet> snippets)
A snippet that joins its arguments with
joiner. |
static Snippet |
makeParametersSnippet(Iterable<Snippet> parameterSnippets) |
static Snippet |
memberSelectSnippet(Iterable<? extends Object> selectors) |
Set<ClassName> |
referencedClasses() |
String |
toString() |
com.google.common.collect.ImmutableSet<TypeName> |
types() |
Appendable |
write(Appendable appendable,
Writable.Context context) |
public String format()
public com.google.common.collect.ImmutableList<Object> args()
public com.google.common.collect.ImmutableSet<TypeName> types()
public Set<ClassName> referencedClasses()
referencedClasses in interface HasClassReferencespublic Appendable write(Appendable appendable, Writable.Context context) throws IOException
IOExceptionpublic static Snippet makeParametersSnippet(Iterable<Snippet> parameterSnippets)
public static Snippet concat(Iterable<Snippet> snippets)
Copyright © 2015 Google, Inc.. All Rights Reserved.