Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import org.domaframework.doma.intellij.extension.getJavaClazz
import org.domaframework.doma.intellij.extension.psi.getClassAnnotation
import org.domaframework.doma.intellij.extension.psi.isDomain
import org.domaframework.doma.intellij.extension.psi.isEntity
import org.domaframework.doma.intellij.formatter.block.SqlBlock
import kotlin.reflect.KClass

object TypeUtil {
/**
Expand Down Expand Up @@ -94,4 +96,15 @@ object TypeUtil {
if (type == null) return false
return PsiTypeChecker.isBaseClassType(type) || DomaClassName.isOptionalWrapperType(type.canonicalText)
}

/**
* Determines whether the specified class instance matches.
*/
fun isExpectedClassType(
expectedClasses: List<KClass<*>>,
childBlock: SqlBlock,
): Boolean =
expectedClasses.any { clazz ->
clazz.isInstance(childBlock)
}
}

This file was deleted.

Loading
Loading