StatementFilter¶
open class StatementFilter
Selects which statements of a block should be taken into account (for example, during analysis). The base implementation applies no filtering; subclasses may restrict the considered statements by overriding filter.
Constructors¶
StatementFilter¶
constructor()
Types¶
Companion¶
object Companion
Properties¶
filter¶
open val filter: (KtExpression) -> Boolean?
A predicate that returns true for the statements to keep, or null to keep all statements.
Functions¶
filterStatements¶
fun StatementFilter.filterStatements(block: KtBlockExpression): List<KtExpression>
Returns the statements of block that pass this filter, or all of them if this filter keeps everything.
getLastStatementInABlock¶
fun StatementFilter.getLastStatementInABlock(block: KtBlockExpression): KtExpression?
Returns the last statement of block that passes this filter, or null if none do.