+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *
+ * http://www.apache.org/licenses/LICENSE-2.0 + *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jacodb.cli
+
+import kotlinx.cli.ArgParser
+import kotlinx.cli.ArgType
+import kotlinx.cli.default
+import kotlinx.cli.required
+import kotlinx.coroutines.runBlocking
+import kotlinx.serialization.decodeFromString
+import kotlinx.serialization.json.Json
+import kotlinx.serialization.json.encodeToStream
+import mu.KLogging
+import org.jacodb.analysis.AnalysisConfig
+import org.jacodb.analysis.AnalysisEngineFactory
+import org.jacodb.analysis.DumpableAnalysisResult
+import org.jacodb.analysis.Factory
+import org.jacodb.analysis.GraphFactory
+import org.jacodb.analysis.JcNaivePoints2EngineFactory
+import org.jacodb.analysis.JcSimplifiedGraphFactory
+import org.jacodb.analysis.NPEAnalysisFactory
+import org.jacodb.analysis.Points2EngineFactory
+import org.jacodb.analysis.UnusedVariableAnalysisFactory
+import org.jacodb.analysis.loadFactories
+import org.jacodb.api.ext.findClass
+import org.jacodb.impl.features.InMemoryHierarchy
+import org.jacodb.impl.features.Usages
+import org.jacodb.impl.jacodb
+import java.io.File
+
+
+private inline fun