abstract fun asType(type: Class<*>): Any
Converts this collection into an object of the specified type. Supported types are: Collection
, List
, Set
, Object[]
, File[]
, File
, and FileTree.
You can call this method in your build script using the as
operator.
type
- The type to convert to.
org.codehaus.groovy.runtime.typehandling.GroovyCastException
- When an unsupported type is specified.
Return
The converted value.