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
-
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 void
Deprecated.static String
Deprecated.static Comparator<String>
Deprecated.static Collection<?>
collectionize
(Object input) Deprecated.Flattens input collections (including arrays *but* not maps).static <T> T
elvis
(T object, T defaultValue) Deprecated.PrefergetOrDefault(Object, Factory)
if the value is expensive to compute or would trigger early configuration.static boolean
endsWith
(CharSequence longer, CharSequence shorter) Deprecated.Checks whether the fistCharSequence
ends 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> T
getOrDefault
(T object, org.gradle.internal.Factory<T> defaultValueSupplier) Deprecated.static boolean
isSecureUrl
(URI url) Deprecated.static boolean
Deprecated.static <T> Comparator<T>
last
(Comparator<? super T> comparator, T lastValue) Deprecated.static Properties
loadProperties
(File propertyFile) Deprecated.static Properties
loadProperties
(InputStream inputStream) Deprecated.static Properties
loadProperties
(URL url) Deprecated.Deprecated.prefix
(String prefix, Collection<String> strings) Deprecated.static void
saveProperties
(Properties properties, File propertyFile) Deprecated.static void
saveProperties
(Properties properties, OutputStream outputStream) Deprecated.static byte[]
Deprecated.static void
serialize
(Object object, OutputStream outputStream) Deprecated.static String
toCamelCase
(CharSequence string) Deprecated.Converts an arbitrary string to a camel-case string which can be used in a Java identifier.static String
toConstant
(CharSequence string) Deprecated.Converts an arbitrary string to upper case identifier with words separated by _.static <T extends Enum<T>>
TDeprecated.Deprecated.Deprecated.static String
toLowerCamelCase
(CharSequence string) Deprecated.static URI
toSecureUrl
(URI scriptUri) Deprecated.static String
Deprecated.static String
toWords
(CharSequence string) Deprecated.Converts an arbitrary string to space-separated words.static String
toWords
(CharSequence string, char separator) Deprecated.static <T> T
uncheckedCall
(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 fistCharSequence
ends 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.
-