Class UtilExtensionsKt
-
- All Implemented Interfaces:
public final class UtilExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final PathgetAsPath()Returns this as a Path. final PathgetAsPath()Returns this as a Path. final static Unitwrite(Document $self, Path path, OutputFormat outputFormat)Writes this org.dom4j.Document to the given path, with the specified outputFormat (defaulting to the pretty printing one without text padding). final static Unitwrite(JsonElement $self, Path path, Gson gsonInstance)Writes this JsonElement to the given path, with the specified gson instance (defaulting to a pretty printing one). final static Provider<Directory>dir(DirectoryProperty $self, String first, String more)Resolves one or more directory parts. final static Provider<RegularFile>file(DirectoryProperty $self, String first, String more)Resolves one or more file parts. final static TestResultCountscountTestResults(List<SquitResult> $self)Iterate the list of SquitResults and returns a TestResultCounts of successful, failed and ignored tests. final static BooleanrequiresRequestBody(String method)Returns whether the given HTTP method requires a request body. final static BooleanpermitsRequestBody(String method)Returns whether the given HTTP method permits a request body. final static UnitprintAndFlush(Object message)Prints the given message to the standard output stream and flushes it afterwards. -
-
Method Detail
-
write
final static Unit write(Document $self, Path path, OutputFormat outputFormat)
Writes this org.dom4j.Document to the given path, with the specified outputFormat (defaulting to the pretty printing one without text padding).
This is a safe operation, as such the file is correctly closed.
-
write
final static Unit write(JsonElement $self, Path path, Gson gsonInstance)
Writes this JsonElement to the given path, with the specified gson instance (defaulting to a pretty printing one).
This is a safe operation, as such the file is correctly closed.
-
dir
final static Provider<Directory> dir(DirectoryProperty $self, String first, String more)
Resolves one or more directory parts.
-
file
final static Provider<RegularFile> file(DirectoryProperty $self, String first, String more)
Resolves one or more file parts.
-
countTestResults
final static TestResultCounts countTestResults(List<SquitResult> $self)
Iterate the list of SquitResults and returns a TestResultCounts of successful, failed and ignored tests.
-
requiresRequestBody
final static Boolean requiresRequestBody(String method)
Returns whether the given HTTP method requires a request body.
-
permitsRequestBody
final static Boolean permitsRequestBody(String method)
Returns whether the given HTTP method permits a request body.
-
printAndFlush
final static Unit printAndFlush(Object message)
Prints the given message to the standard output stream and flushes it afterwards.
-
-
-
-