Package org.gradle.util
Class GUtil
java.lang.Object
org.gradle.util.GUtil
Deprecated.
Will be removed in Gradle 9.0.
This class is only here to maintain binary compatibility with existing plugins.
Plugins should prefer external collection frameworks over this class.
Internally, all code should use GUtil.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> Map <K, V> Deprecated.static <V,T extends Collection<? super V>>
TaddToCollection(T dest, boolean failOnNull, Iterable<? extends V> src) Deprecated.static <V,T extends Collection<? super V>>
TaddToCollection(T dest, boolean failOnNull, Iterable<? extends V>... srcs) Deprecated.static <V,T extends Collection<? super V>>
TaddToCollection(T dest, Iterable<? extends V> src) Deprecated.static <V,T extends Collection<? super V>>
TaddToCollection(T dest, Iterable<? extends V>... srcs) Deprecated.static voidDeprecated.static StringDeprecated.static Comparator<String> Deprecated.static Collection<?> collectionize(Object input) Deprecated.Flattens input collections (including arrays *but* not maps).static <T> Telvis(T object, T defaultValue) Deprecated.PrefergetOrDefault(Object, Factory)if the value is expensive to compute or would trigger early configuration.static booleanendsWith(CharSequence longer, CharSequence shorter) Deprecated.Checks whether the fistCharSequenceends with the second.static <T extends Collection<?>>
TDeprecated.static <T extends Collection<?>>
TDeprecated.static <T extends Collection<?>>
Tflatten(Collection<?> elements, T addTo) Deprecated.static <T extends Collection<?>>
Tflatten(Collection<?> elements, T addTo, boolean flattenMapsAndArrays) Deprecated.static <T extends Collection<?>>
Tflatten(Collection<?> elements, T addTo, boolean flattenMaps, boolean flattenArrays) Deprecated.flatten(Collection<Object> elements) Deprecated.flatten(Collection<Object> elements, boolean flattenMapsAndArrays) Deprecated.static <T extends Collection<?>>
TflattenElements(Object... elements) Deprecated.static <T> TgetOrDefault(T object, org.gradle.internal.Factory<T> defaultValueSupplier) Deprecated.static booleanisSecureUrl(URI url) Deprecated.static booleanDeprecated.static <T> Comparator<T> last(Comparator<? super T> comparator, T lastValue) Deprecated.static PropertiesloadProperties(File propertyFile) Deprecated.static PropertiesloadProperties(InputStream inputStream) Deprecated.static PropertiesloadProperties(URL url) Deprecated.Deprecated.prefix(String prefix, Collection<String> strings) Deprecated.static voidsaveProperties(Properties properties, File propertyFile) Deprecated.static voidsaveProperties(Properties properties, OutputStream outputStream) Deprecated.static byte[]Deprecated.static voidserialize(Object object, OutputStream outputStream) Deprecated.static StringtoCamelCase(CharSequence string) Deprecated.Converts an arbitrary string to a camel-case string which can be used in a Java identifier.static StringtoConstant(CharSequence string) Deprecated.Converts an arbitrary string to upper case identifier with words separated by _.static <T extends Enum<T>>
TDeprecated.Deprecated.Deprecated.static StringtoLowerCamelCase(CharSequence string) Deprecated.static URItoSecureUrl(URI scriptUri) Deprecated.static StringDeprecated.static StringtoWords(CharSequence string) Deprecated.Converts an arbitrary string to space-separated words.static StringtoWords(CharSequence string, char separator) Deprecated.static <T> TuncheckedCall(Callable<T> callable) Deprecated.Calls the given callable converting any thrown exception to an unchecked exception viaUncheckedException.throwAsUncheckedException(Throwable)
-
Constructor Details
-
GUtil
public GUtil()Deprecated.
-
-
Method Details
-
flatten
Deprecated. -
flatten
Deprecated. -
flatten
Deprecated. -
flattenElements
Deprecated. -
flatten
public static <T extends Collection<?>> T flatten(Collection<?> elements, T addTo, boolean flattenMapsAndArrays) Deprecated. -
flatten
public static <T extends Collection<?>> T flatten(Collection<?> elements, T addTo, boolean flattenMaps, boolean flattenArrays) Deprecated. -
collectionize
Deprecated.Flattens input collections (including arrays *but* not maps). If input is not a collection wraps it in a collection and returns it.- Parameters:
input- any object- Returns:
- collection of flattened input or single input wrapped in a collection.
-
flatten
Deprecated. -
flatten
Deprecated. -
asPath
Deprecated. -
prefix
Deprecated. -
isTrue
Deprecated. -
elvis
Deprecated.PrefergetOrDefault(Object, Factory)if the value is expensive to compute or would trigger early configuration. -
getOrDefault
@Nullable public static <T> T getOrDefault(@Nullable T object, org.gradle.internal.Factory<T> defaultValueSupplier) Deprecated. -
addToCollection
public static <V,T extends Collection<? super V>> T addToCollection(T dest, boolean failOnNull, Iterable<? extends V> src) Deprecated. -
addToCollection
public static <V,T extends Collection<? super V>> T addToCollection(T dest, Iterable<? extends V> src) Deprecated. -
addToCollection
@Deprecated public static <V,T extends Collection<? super V>> T addToCollection(T dest, boolean failOnNull, Iterable<? extends V>... srcs) Deprecated. -
addToCollection
@Deprecated public static <V,T extends Collection<? super V>> T addToCollection(T dest, Iterable<? extends V>... srcs) Deprecated. -
caseInsensitive
Deprecated. -
addMaps
Deprecated. -
addToMap
Deprecated. -
loadProperties
Deprecated. -
loadProperties
Deprecated. -
loadProperties
Deprecated. -
saveProperties
Deprecated. -
saveProperties
Deprecated. -
map
Deprecated. -
toString
Deprecated. -
toCamelCase
Deprecated.Converts an arbitrary string to a camel-case string which can be used in a Java identifier. Eg, with_underscores -> withUnderscores -
toLowerCamelCase
Deprecated. -
toConstant
Deprecated.Converts an arbitrary string to upper case identifier with words separated by _. Eg, camelCase -> CAMEL_CASE -
toWords
Deprecated.Converts an arbitrary string to space-separated words. Eg, camelCase -> camel case, with_underscores -> with underscores -
toWords
Deprecated. -
serialize
Deprecated. -
serialize
Deprecated. -
last
Deprecated. -
uncheckedCall
Deprecated.Calls the given callable converting any thrown exception to an unchecked exception viaUncheckedException.throwAsUncheckedException(Throwable)- Type Parameters:
T- Callable's return type- Parameters:
callable- The callable to call- Returns:
- The value returned by
Callable.call()
-
toEnum
Deprecated. -
toEnumSet
Deprecated. -
toEnumSet
Deprecated. -
endsWith
Deprecated.Checks whether the fistCharSequenceends with the second. If theCharSequence.charAt(int)method of both sequences is fast, this check is faster than converting them to Strings and usingString.endsWith(String). -
toSecureUrl
Deprecated. -
isSecureUrl
Deprecated.
-