Skip to content

Commit

Permalink
refactor(java): replace with lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Nov 25, 2022
1 parent 3c69a59 commit 6c6ed71
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,14 @@ open class JavaFullIdentListener(fileName: String, val classes: Array<String>) :
}

open fun buildImplements(ctx: JavaParser.ClassDeclarationContext): Array<String> {
var implements = arrayOf<String>()
for (_type in ctx.typeList()) {
return ctx.typeList().map { _type ->
var target = this.warpTargetFullType(_type.text).targetType
if (target == "") {
target = _type.text
}
implements += target
}
return implements

target
}.toTypedArray()
}

override fun exitClassDeclaration(ctx: JavaParser.ClassDeclarationContext?) {
Expand Down

0 comments on commit 6c6ed71

Please sign in to comment.