MethodFinder

Helper for finding method(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
fun filter(filter: Method.() -> Boolean): MethodFinder

Filter with a predicate.

Link copied to clipboard

Filter if they are abstract.

Link copied to clipboard
fun filterByAssignableParamTypes(vararg paramTypes: Class<*>?): MethodFinder

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

Link copied to clipboard

Filter by method assignable return type.

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

Filter by exception types

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

Use condition to filter by the modifiers.

Filter by the same modifiers.

Link copied to clipboard

Filter by method name.

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<*>?): MethodFinder

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

Use condition to filter parameter types

Link copied to clipboard

Filter by method return type.

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 if they are final.

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-abstract.

Link copied to clipboard

Filter if they are non-final.

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-static.

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 static.

Link copied to clipboard

Filter if they are varargs.

Link copied to clipboard
open override fun findSuper(untilPredicate: Class<*>.() -> Boolean?): MethodFinder

Contact the field sequence in super classes. Only effect when the finder created from a class.

Link copied to clipboard
override fun first(): Method

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

override fun first(condition: Method.() -> Boolean): Method

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

Link copied to clipboard
override fun firstOrNull(): Method?

Get the first element or null if not found.

override fun firstOrNull(condition: Method.() -> Boolean): Method?

Get the first element by condition or null if not found

Link copied to clipboard
fun forEach(action: (Method) -> Unit)

For-each loop for.

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

For-each loop with index for.

Link copied to clipboard
override fun last(): Method

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

override fun last(condition: Method.() -> Boolean): Method

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

Link copied to clipboard
override fun lastOrNull(): Method?

Get the last element or null if not found.

override fun lastOrNull(condition: Method.() -> Boolean): Method?

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: (Method) -> R): C

Map to the collection.

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

Map to the hashset.

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

Map to the list.

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

Map to the mutable list.

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

Map to the mutable set.

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

Map to the set.

Link copied to clipboard
fun onEach(action: (Method) -> Unit): MethodFinder

On-each loop for.

Link copied to clipboard
fun onEachIndexed(action: (index: Int, Method) -> Unit): MethodFinder

On-each loop with index for.

Link copied to clipboard
operator fun plus(other: Array<Method>): MethodFinder
operator fun plus(other: Iterable<Method>): MethodFinder
operator fun plus(other: Sequence<Method>): MethodFinder
Link copied to clipboard
operator fun plusAssign(other: BaseFinder<Method, MethodFinder>)
operator fun plusAssign(other: Array<Method>)
operator fun plusAssign(other: Iterable<Method>)
operator fun plusAssign(other: Sequence<Method>)
Link copied to clipboard
fun requireCount(condition: Method.() -> Boolean, count: Int): MethodFinder
fun requireCount(condition: Method.() -> Boolean, range: IntRange): MethodFinder
Link copied to clipboard
Link copied to clipboard

Check sequence only has one element.

fun requireSingle(condition: Method.() -> Boolean): MethodFinder
Link copied to clipboard

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

Link copied to clipboard
override fun single(): Method

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

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

Get the single element or null if not found.

override fun singleOrNull(condition: Method.() -> Boolean): Method?
Link copied to clipboard
fun <C : MutableCollection<Method>> 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<Method>

Make sequence to the set.