Top Description Constructors Methods
com.squareup.javapoet

pack-priv final Class Util

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .Collection, .Collections, .LinkedHashMap, .LinkedHashSet, .List, .Map, .Set, javax.lang.model.element.Modifier

Like Guava, but worse and standalone. This makes it easier to mix JavaPoet with libraries that bring their own version of Guava.

Constructor Summary

AccessConstructor and Description
private
Util()

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
pack-priv static void
checkArgument(boolean condition, String format, Object... args)

pack-priv static <T> T
checkNotNull(T reference, String format, Object... args)

pack-priv static void
checkState(boolean condition, String format, Object... args)

pack-priv static <T> List<T>
immutableList(Collection<T> collection)

pack-priv static <K, V> Map<K, V>
immutableMap(Map<K, V> map)

pack-priv static <K, V> Map<K, List<V>>
immutableMultimap(Map<K, List<V>> multimap)

pack-priv static <T> Set<T>
pack-priv static void
requireExactlyOneOf(Set<Modifier> modifiers, Modifier... mutuallyExclusive)

pack-priv static String
stringLiteralWithDoubleQuotes(String value, String indent)

Returns the string literal representing value, including wrapping double quotes.

pack-priv static <T> Set<T>
union(Set<T> a, Set<T> b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Utilback to summary
private Util()

Method Detail

characterLiteralWithoutSingleQuotesback to summary
pack-priv static String characterLiteralWithoutSingleQuotes(char c)
checkArgumentback to summary
pack-priv static void checkArgument(boolean condition, String format, Object... args)
checkNotNullback to summary
pack-priv static <T> T checkNotNull(T reference, String format, Object... args)
checkStateback to summary
pack-priv static void checkState(boolean condition, String format, Object... args)
immutableListback to summary
pack-priv static <T> List<T> immutableList(Collection<T> collection)
immutableMapback to summary
pack-priv static <K, V> Map<K, V> immutableMap(Map<K, V> map)
immutableMultimapback to summary
pack-priv static <K, V> Map<K, List<V>> immutableMultimap(Map<K, List<V>> multimap)
immutableSetback to summary
pack-priv static <T> Set<T> immutableSet(Collection<T> set)
requireExactlyOneOfback to summary
pack-priv static void requireExactlyOneOf(Set<Modifier> modifiers, Modifier... mutuallyExclusive)
stringLiteralWithDoubleQuotesback to summary
pack-priv static String stringLiteralWithDoubleQuotes(String value, String indent)

Returns the string literal representing value, including wrapping double quotes.

unionback to summary
pack-priv static <T> Set<T> union(Set<T> a, Set<T> b)