org.archguard.scanner.analyser.xml.HandlerDispatcher.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of feat_datamap Show documentation
Show all versions of feat_datamap Show documentation
ArchGuard is a architecture governance tool which can analysis architecture in container, component, code level, create architecture fitness functions, and anaysis system dependencies..
package org.archguard.scanner.analyser.xml
import org.archguard.scanner.analyser.xml.mybatis.MyBatisHandler
import org.xml.sax.ext.DefaultHandler2
// todo: use like Koin: https://insert-koin.io/docs/quickstart/kotlin
class HandlerDispatcher: DefaultHandler2() {
private var handlerName: String = ""
private val mybatisHandler: MyBatisHandler = MyBatisHandler()
override fun startDTD(name: String?, publicId: String?, systemId: String?) {
if(mybatisHandler.detect(name, publicId, systemId)) {
this.handlerName = mybatisHandler.name()
}
}
fun getContentHandler(): BasedXmlHandler? {
when(this.handlerName) {
"MyBatisHandler" -> {
return mybatisHandler
}
}
return null
}
fun handlerName(): String {
return this.handlerName
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy