ConstructorFinder

Helper for finding constructor(s) in the class or collection.

Types

Link copied to clipboard
object -Static

Properties

Link copied to clipboard
open override val name: String

Functions

Link copied to clipboard

Concatenate with another finder.

Concatenate with another array.

Concatenate with another iterable.

Concatenate with another sequence.

Link copied to clipboard

Filter with a predicate.

Link copied to clipboard

Filter by parameter types or subclass of types, or if null to skip check some parameters

Link copied to clipboard
fun filterByExceptionTypes(vararg exceptionTypes: Class<*>): ConstructorFinder

Filter by exception types

Link copied to clipboard
fun filterByModifiers(predicate: (modifiers: Int) -> Boolean): ConstructorFinder

Use condition to filter by the modifiers.

Filter by the same modifiers.

Link copied to clipboard

Use condition to filter parameter count

Filter by parameter count

Filter by parameter count in range

Link copied to clipboard
fun filterByParamTypes(vararg paramTypes: Class<*>?): ConstructorFinder

Filter by parameter types, or if null to skip check some parameters

Use condition to filter parameter types

Link copied to clipboard

Filter the executable if the parameter is empty

Link copied to clipboard

Filter exclude the modifiers.

Link copied to clipboard

Filter include the modifiers.

Link copied to clipboard

Filter if they are native.

Link copied to clipboard

Filter if they are non-native.

Link copied to clipboard

Filter if they are non-package-private.

Link copied to clipboard

Filter if they are non-private.

Link copied to clipboard

Filter if they are non-protected.

Link copied to clipboard

Filter if they are non-public.

Link copied to clipboard

Filter if they are non-varargs.

Link copied to clipboard

Filter the executable if the parameter is not empty

Link copied to clipboard

Filter if they are package-private.

Link copied to clipboard

Filter if they are private.

Link copied to clipboard

Filter if they are protected.

Link copied to clipboard

Filter if they are public.

Link copied to clipboard

Filter if they are varargs.

Link copied to clipboard
override fun first(): Constructor<*>

Get the first element or throw an exception if there is no such element.

override fun first(condition: Constructor<*>.() -> Boolean): Constructor<*>

Get the first element by condition or throw an exception if there is no such element.

Link copied to clipboard
override fun firstOrNull(): Constructor<*>?

Get the first element or null if not found.

override fun firstOrNull(condition: Constructor<*>.() -> Boolean): Constructor<*>?

Get the first element by condition or null if not found

Link copied to clipboard
fun forEach(action: (Constructor<*>) -> Unit)

For-each loop for.

Link copied to clipboard
fun forEachIndexed(action: (index: Int, Constructor<*>) -> Unit)

For-each loop with index for.

Link copied to clipboard
override fun last(): Constructor<*>

Get the last element or throw an exception if there is no such element.

override fun last(condition: Constructor<*>.() -> Boolean): Constructor<*>

Get the last element by condition or throw an exception if there is no such element.

Link copied to clipboard
override fun lastOrNull(): Constructor<*>?

Get the last element or null if not found.

override fun lastOrNull(condition: Constructor<*>.() -> Boolean): Constructor<*>?

Get the last element by condition or null if not found

Link copied to clipboard
fun <R, C : MutableCollection<in R>> mapToCollection(destination: C, transform: (Constructor<*>) -> R): C

Map to the collection.

Link copied to clipboard
fun <R> mapToHashSet(transform: (Constructor<*>) -> R): HashSet<R>

Map to the hashset.

Link copied to clipboard
fun <R> mapToList(transform: (Constructor<*>) -> R): List<R>

Map to the list.

Link copied to clipboard
fun <R> mapToMutableList(transform: (Constructor<*>) -> R): List<R>

Map to the mutable list.

Link copied to clipboard
fun <R> mapToMutableSet(transform: (Constructor<*>) -> R): MutableSet<R>

Map to the mutable set.

Link copied to clipboard
fun <R> mapToSet(transform: (Constructor<*>) -> R): Set<R>

Map to the set.

Link copied to clipboard

On-each loop for.

Link copied to clipboard
fun onEachIndexed(action: (index: Int, Constructor<*>) -> Unit): ConstructorFinder

On-each loop with index for.

Link copied to clipboard
operator fun plus(other: Array<Constructor<*>>): ConstructorFinder
operator fun plus(other: Iterable<Constructor<*>>): ConstructorFinder
operator fun plus(other: Sequence<Constructor<*>>): ConstructorFinder
Link copied to clipboard
operator fun plusAssign(other: Array<Constructor<*>>)
operator fun plusAssign(other: Iterable<Constructor<*>>)
operator fun plusAssign(other: Sequence<Constructor<*>>)
Link copied to clipboard
Link copied to clipboard

Check sequence only has one element.

Link copied to clipboard

Check sequence only has one element or null if not found.

Link copied to clipboard
override fun single(): Constructor<*>

Get the single element or throw an exception if there is no such element or more than one element.

override fun single(condition: Constructor<*>.() -> Boolean): Constructor<*>
Link copied to clipboard
override fun singleOrNull(): Constructor<*>?

Get the single element or null if not found.

override fun singleOrNull(condition: Constructor<*>.() -> Boolean): Constructor<*>?
Link copied to clipboard
fun <C : MutableCollection<Constructor<*>>> toCollection(collection: C): C

Make sequence to the collection.

Link copied to clipboard

Make sequence to the hashset.

Link copied to clipboard

Make sequence to the list.

Link copied to clipboard

Make sequence to the mutable list.

Link copied to clipboard

Make sequence to the mutable set.

Link copied to clipboard
fun toSet(): Set<Constructor<*>>

Make sequence to the set.