Package org.gradle.util
Klasse GUtil
java.lang.Object
org.gradle.util.GUtil
Veraltet.
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.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <K,V> Map <K, V> Veraltet.static <V,T extends Collection<? super V>>
TaddToCollection(T dest, boolean failOnNull, Iterable<? extends V> src) Veraltet.static <V,T extends Collection<? super V>>
TaddToCollection(T dest, boolean failOnNull, Iterable<? extends V>... srcs) Veraltet.static <V,T extends Collection<? super V>>
TaddToCollection(T dest, Iterable<? extends V> src) Veraltet.static <V,T extends Collection<? super V>>
TaddToCollection(T dest, Iterable<? extends V>... srcs) Veraltet.static voidVeraltet.static StringVeraltet.static Comparator<String> Veraltet.static Collection<?> collectionize(Object input) Veraltet.Flattens input collections (including arrays *but* not maps).static <T> Telvis(T object, T defaultValue) Veraltet.PrefergetOrDefault(Object, Factory)if the value is expensive to compute or would trigger early configuration.static booleanendsWith(CharSequence longer, CharSequence shorter) Veraltet.Checks whether the fistCharSequenceends with the second.static <T extends Collection<?>>
TVeraltet.static <T extends Collection<?>>
TVeraltet.static <T extends Collection<?>>
Tflatten(Collection<?> elements, T addTo) Veraltet.static <T extends Collection<?>>
Tflatten(Collection<?> elements, T addTo, boolean flattenMapsAndArrays) Veraltet.static <T extends Collection<?>>
Tflatten(Collection<?> elements, T addTo, boolean flattenMaps, boolean flattenArrays) Veraltet.flatten(Collection<Object> elements) Veraltet.flatten(Collection<Object> elements, boolean flattenMapsAndArrays) Veraltet.static <T extends Collection<?>>
TflattenElements(Object... elements) Veraltet.static <T> TgetOrDefault(T object, org.gradle.internal.Factory<T> defaultValueSupplier) Veraltet.static booleanisSecureUrl(URI url) Veraltet.static booleanVeraltet.static <T> Comparator<T> last(Comparator<? super T> comparator, T lastValue) Veraltet.static PropertiesloadProperties(File propertyFile) Veraltet.static PropertiesloadProperties(InputStream inputStream) Veraltet.static PropertiesloadProperties(URL url) Veraltet.Veraltet.prefix(String prefix, Collection<String> strings) Veraltet.static voidsaveProperties(Properties properties, File propertyFile) Veraltet.static voidsaveProperties(Properties properties, OutputStream outputStream) Veraltet.static byte[]Veraltet.static voidserialize(Object object, OutputStream outputStream) Veraltet.static StringtoCamelCase(CharSequence string) Veraltet.Converts an arbitrary string to a camel-case string which can be used in a Java identifier.static StringtoConstant(CharSequence string) Veraltet.Converts an arbitrary string to upper case identifier with words separated by _.static <T extends Enum<T>>
TVeraltet.Veraltet.Veraltet.static StringtoLowerCamelCase(CharSequence string) Veraltet.static URItoSecureUrl(URI scriptUri) Veraltet.static StringVeraltet.static StringtoWords(CharSequence string) Veraltet.Converts an arbitrary string to space-separated words.static StringtoWords(CharSequence string, char separator) Veraltet.static <T> TuncheckedCall(Callable<T> callable) Veraltet.Calls the given callable converting any thrown exception to an unchecked exception viaUncheckedException.throwAsUncheckedException(Throwable)
-
Konstruktordetails
-
GUtil
public GUtil()Veraltet.
-
-
Methodendetails
-
flatten
Veraltet. -
flatten
Veraltet. -
flatten
Veraltet. -
flattenElements
Veraltet. -
flatten
public static <T extends Collection<?>> T flatten(Collection<?> elements, T addTo, boolean flattenMapsAndArrays) Veraltet. -
flatten
public static <T extends Collection<?>> T flatten(Collection<?> elements, T addTo, boolean flattenMaps, boolean flattenArrays) Veraltet. -
collectionize
Veraltet.Flattens input collections (including arrays *but* not maps). If input is not a collection wraps it in a collection and returns it.- Parameter:
input- any object- Gibt zurück:
- collection of flattened input or single input wrapped in a collection.
-
flatten
Veraltet. -
flatten
Veraltet. -
asPath
Veraltet. -
prefix
Veraltet. -
isTrue
Veraltet. -
elvis
Veraltet.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) Veraltet. -
addToCollection
public static <V,T extends Collection<? super V>> T addToCollection(T dest, boolean failOnNull, Iterable<? extends V> src) Veraltet. -
addToCollection
public static <V,T extends Collection<? super V>> T addToCollection(T dest, Iterable<? extends V> src) Veraltet. -
addToCollection
@Deprecated public static <V,T extends Collection<? super V>> T addToCollection(T dest, boolean failOnNull, Iterable<? extends V>... srcs) Veraltet. -
addToCollection
@Deprecated public static <V,T extends Collection<? super V>> T addToCollection(T dest, Iterable<? extends V>... srcs) Veraltet. -
caseInsensitive
Veraltet. -
addMaps
Veraltet. -
addToMap
Veraltet. -
loadProperties
Veraltet. -
loadProperties
Veraltet. -
loadProperties
Veraltet. -
saveProperties
Veraltet. -
saveProperties
Veraltet. -
map
Veraltet. -
toString
Veraltet. -
toCamelCase
Veraltet.Converts an arbitrary string to a camel-case string which can be used in a Java identifier. Eg, with_underscores -> withUnderscores -
toLowerCamelCase
Veraltet. -
toConstant
Veraltet.Converts an arbitrary string to upper case identifier with words separated by _. Eg, camelCase -> CAMEL_CASE -
toWords
Veraltet.Converts an arbitrary string to space-separated words. Eg, camelCase -> camel case, with_underscores -> with underscores -
toWords
Veraltet. -
serialize
Veraltet. -
serialize
Veraltet. -
last
Veraltet. -
uncheckedCall
Veraltet.Calls the given callable converting any thrown exception to an unchecked exception viaUncheckedException.throwAsUncheckedException(Throwable)- Typparameter:
T- Callable's return type- Parameter:
callable- The callable to call- Gibt zurück:
- The value returned by
Callable.call()
-
toEnum
Veraltet. -
toEnumSet
Veraltet. -
toEnumSet
Veraltet. -
endsWith
Veraltet.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
Veraltet. -
isSecureUrl
Veraltet.
-