diff --git a/.codecov.yml b/.codecov.yml index 9842ce09..efd9c158 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -16,5 +16,5 @@ comment: behavior: default ignore: - - "src/main/scala/io/github/dreamylost/package.scala" - - "src/main/scala/io/github/dreamylost/macros/macros.scala" \ No newline at end of file + - "src/main/scala/org/bitlap/tools/package.scala" + - "src/main/scala/org/bitlap/tools/macros/macros.scala" diff --git a/README.md b/README.md index 7eaddf23..3e68f0ea 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -https://dreamylost.cn +https://bitlap.org # scala-macro-tools -[![Build](https://github.com/jxnu-liguobin/scala-macro-tools/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/jxnu-liguobin/scala-macro-tools/actions/workflows/ScalaCI.yml) -[![codecov](https://codecov.io/gh/jxnu-liguobin/scala-macro-tools/branch/master/graph/badge.svg?token=IA596YRTOT)](https://codecov.io/gh/jxnu-liguobin/scala-macro-tools) -[![Maven Central](https://img.shields.io/maven-central/v/io.github.jxnu-liguobin/scala-macro-tools_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.jxnu-liguobin%22%20AND%20a:%22scala-macro-tools_2.13%22) +[![Build](https://github.com/bitlap/scala-macro-tools/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/bitlap/scala-macro-tools/actions/workflows/ScalaCI.yml) +[![codecov](https://codecov.io/gh/bitlap/scala-macro-tools/branch/master/graph/badge.svg?token=IA596YRTOT)](https://codecov.io/gh/bitlap/scala-macro-tools) +[![Maven Central deprecated](https://img.shields.io/maven-central/v/io.github.jxnu-liguobin/scala-macro-tools_2.13.svg?label=Maven%20Central%20deprecated)](https://search.maven.org/search?q=g:%22io.github.jxnu-liguobin%22%20AND%20a:%22scala-macro-tools_2.13%22) +[![Maven Central](https://img.shields.io/maven-central/v/org.bitlap/scala-macro-tools_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.bitlap%22%20AND%20a:%22scala-macro-tools_2.13%22) [![Version](https://img.shields.io/jetbrains/plugin/v/17202-scala-macro-tools)](https://plugins.jetbrains.com/plugin/17202-scala-macro-tools) Motivation @@ -34,6 +35,7 @@ Learn Scala macro and abstract syntax tree. - `@jacksonEnum` - `@elapsed` - `@JavaCompatible` +- `ProcessorCreator` > The intellij plugin named `Scala-Macro-Tools` in marketplace. @@ -46,7 +48,7 @@ Learn Scala macro and abstract syntax tree. Add library dependency ```scala -"io.github.jxnu-liguobin" %% "scala-macro-tools" % "" +"org.bitlap.tools" %% "scala-macro-tools" % "" ``` The artefacts have been uploaded to Maven Central. Importing the library into your build system (e.g gradle, sbt), is not enough. You need to follow an extra step. diff --git a/README_CN.md b/README_CN.md index 7cdf73a5..3f159366 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,10 +1,11 @@ -https://dreamylost.cn +https://bitlap.org # scala-macro-tools -[![Build](https://github.com/jxnu-liguobin/scala-macro-tools/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/jxnu-liguobin/scala-macro-tools/actions/workflows/ScalaCI.yml) -[![codecov](https://codecov.io/gh/jxnu-liguobin/scala-macro-tools/branch/master/graph/badge.svg?token=IA596YRTOT)](https://codecov.io/gh/jxnu-liguobin/scala-macro-tools) -[![Maven Central](https://img.shields.io/maven-central/v/io.github.jxnu-liguobin/scala-macro-tools_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.jxnu-liguobin%22%20AND%20a:%22scala-macro-tools_2.13%22) +[![Build](https://github.com/bitlap/scala-macro-tools/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/bitlap/scala-macro-tools/actions/workflows/ScalaCI.yml) +[![codecov](https://codecov.io/gh/bitlap/scala-macro-tools/branch/master/graph/badge.svg?token=IA596YRTOT)](https://codecov.io/gh/bitlap/scala-macro-tools) +[![Maven Central deprecated](https://img.shields.io/maven-central/v/io.github.jxnu-liguobin/scala-macro-tools_2.13.svg?label=Maven%20Central$20deprecated)](https://search.maven.org/search?q=g:%22io.github.jxnu-liguobin%22%20AND%20a:%22scala-macro-tools_2.13%22) +[![Maven Central](https://img.shields.io/maven-central/v/org.bitlap/scala-macro-tools_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.bitlap%22%20AND%20a:%22scala-macro-tools_2.13%22) [![Version](https://img.shields.io/jetbrains/plugin/v/17202-scala-macro-tools)](https://plugins.jetbrains.com/plugin/17202-scala-macro-tools) 该库的目的 @@ -34,6 +35,7 @@ - `@jacksonEnum` - `@elapsed` - `@JavaCompatible` +- `ProcessorCreator` > Intellij插件 `Scala-Macro-Tools`。 @@ -48,7 +50,7 @@ > 在gradle,maven中,通常`scala-macro-tools`被替换为`scala-macro-tools_2.12`这种。其中,`2.12`表示Scala版本号。 ```scala -"io.github.jxnu-liguobin" %% "scala-macro-tools" % "" +"org.bitlap.tools" %% "scala-macro-tools" % "" ``` 该库已发布到maven中央仓库,请使用最新版本。仅将本库导入构建系统(例如gradle、sbt)是不够的。你需要多走一步。 diff --git a/build.sbt b/build.sbt index 40c4cdb5..87cc7cc2 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import sbt.{ Def, Test } import sbtrelease.ReleaseStateTransformations._ name := "scala-macro-tools" -organization := "io.github.jxnu-liguobin" +organization := "org.bitlap" lazy val scala212 = "2.12.14" lazy val scala211 = "2.11.12" @@ -33,9 +33,9 @@ lazy val root = (project in file(".")) case _ => List("-Ymacro-annotations" /*, "-Ymacro-debug-verbose"*/) } } ++ Seq("-language:experimental.macros"), - organizationName := "jxnu-liguobin && contributors", + organizationName := "org.bitlap", startYear := Some(2021), - licenses += ("MIT", new URL("https://github.com/jxnu-liguobin/scala-macro-tools/blob/master/LICENSE")), + licenses += ("MIT", new URL("https://github.com/bitlap/scala-macro-tools/blob/master/LICENSE")), Test / testOptions += Tests.Argument("-oDF"), Test / fork := true, // Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.ScalaLibrary, diff --git a/examples/scala2-11/src/main/scala/io/github/dreamylost/Main.scala b/examples/scala2-11/src/main/scala/org/bitlap/tools/Main.scala similarity index 84% rename from examples/scala2-11/src/main/scala/io/github/dreamylost/Main.scala rename to examples/scala2-11/src/main/scala/org/bitlap/tools/Main.scala index 1b5d5468..c0782fb0 100644 --- a/examples/scala2-11/src/main/scala/io/github/dreamylost/Main.scala +++ b/examples/scala2-11/src/main/scala/org/bitlap/tools/Main.scala @@ -1,4 +1,6 @@ -package io.github.dreamylost +package org.bitlap.tools + +import io.github.dreamylost.toString /** * diff --git a/examples/scala2-12/src/main/scala/io/github/dreamylost/Main.scala b/examples/scala2-12/src/main/scala/org/bitlap/tools/Main.scala similarity index 84% rename from examples/scala2-12/src/main/scala/io/github/dreamylost/Main.scala rename to examples/scala2-12/src/main/scala/org/bitlap/tools/Main.scala index 1b5d5468..c0782fb0 100644 --- a/examples/scala2-12/src/main/scala/io/github/dreamylost/Main.scala +++ b/examples/scala2-12/src/main/scala/org/bitlap/tools/Main.scala @@ -1,4 +1,6 @@ -package io.github.dreamylost +package org.bitlap.tools + +import io.github.dreamylost.toString /** * diff --git a/examples/scala2-13/src/main/scala/io/github/dreamylost/Main.scala b/examples/scala2-13/src/main/scala/org/bitlap/tools/Main.scala similarity index 85% rename from examples/scala2-13/src/main/scala/io/github/dreamylost/Main.scala rename to examples/scala2-13/src/main/scala/org/bitlap/tools/Main.scala index b4b74a58..805ad782 100644 --- a/examples/scala2-13/src/main/scala/io/github/dreamylost/Main.scala +++ b/examples/scala2-13/src/main/scala/org/bitlap/tools/Main.scala @@ -1,4 +1,8 @@ -package io.github.dreamylost +package org.bitlap.tools + +import io.github.dreamylost.toString +import io.github.dreamylost.builder +import io.github.dreamylost.apply /** * diff --git a/intellij-plugin/build.sbt b/intellij-plugin/build.sbt index 5a461c17..61882034 100644 --- a/intellij-plugin/build.sbt +++ b/intellij-plugin/build.sbt @@ -1,7 +1,7 @@ import org.jetbrains.sbtidea.Keys._ name := "scala-macro-tools-intellij-plugin" -organization := "io.github.jxnu-liguobin" +organization := "org.bitlap.tools" lazy val scala213 = "2.13.6" diff --git a/intellij-plugin/src/main/resources/META-INF/plugin.xml b/intellij-plugin/src/main/resources/META-INF/plugin.xml index e47e2764..92cc2ca0 100644 --- a/intellij-plugin/src/main/resources/META-INF/plugin.xml +++ b/intellij-plugin/src/main/resources/META-INF/plugin.xml @@ -18,13 +18,13 @@ messages.PluginBundle - - + + - + diff --git a/intellij-plugin/src/main/resources/messages/PluginBundle.properties b/intellij-plugin/src/main/resources/messages/PluginBundle.properties index 59ca2330..1322c1ba 100644 --- a/intellij-plugin/src/main/resources/messages/PluginBundle.properties +++ b/intellij-plugin/src/main/resources/messages/PluginBundle.properties @@ -16,5 +16,5 @@ hello.from.project.getname=Hello from project "{0}"! my.cool.tool.window=My Cool Tool Window ### resources/META-INF/plugin.xml -action.io.github.dreamylost.plugin.PopupDialogAction.text=Action Basics Plugin: Pop Dialog Action -action.io.github.dreamylost.plugin.PopupDialogAction.description=SDK action example +action.org.bitlap.tools.plugin.PopupDialogAction.text=Action Basics Plugin: Pop Dialog Action +action.org.bitlap.tools.plugin.PopupDialogAction.description=SDK action example diff --git a/intellij-plugin/src/main/resources/patch/description.html b/intellij-plugin/src/main/resources/patch/description.html index 13a5a896..a6c92714 100644 --- a/intellij-plugin/src/main/resources/patch/description.html +++ b/intellij-plugin/src/main/resources/patch/description.html @@ -1,8 +1,8 @@ Scala Macro Tools plugin for IntelliJ IDEA
-GitHub | -Issues +GitHub | +Issues

A plugin that implements Lombok-like functionality with Scala macros diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/PluginBundle.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/PluginBundle.scala similarity index 92% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/PluginBundle.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/PluginBundle.scala index c9a5854e..740cfe45 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/PluginBundle.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/PluginBundle.scala @@ -1,4 +1,4 @@ -package io.github.dreamylost.plugin +package org.bitlap.tools.plugin import com.intellij.DynamicBundle import org.jetbrains.annotations.{ NotNull, PropertyKey } diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroInjector.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroInjector.scala similarity index 89% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroInjector.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroInjector.scala index cd996a71..4e0b7ac6 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroInjector.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroInjector.scala @@ -1,8 +1,8 @@ -package io.github.dreamylost.plugin +package org.bitlap.tools.plugin import com.intellij.openapi.components.ServiceManager -import io.github.dreamylost.plugin.processor.ProcessType -import io.github.dreamylost.plugin.processor.ProcessType.ProcessType +import org.bitlap.tools.plugin.processor.ProcessType +import org.bitlap.tools.plugin.processor.ProcessType.ProcessType import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTypeDefinition import org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef.SyntheticMembersInjector /** diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroNames.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroNames.scala similarity index 79% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroNames.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroNames.scala index 4650f2a0..a4f47b95 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroNames.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroNames.scala @@ -1,4 +1,4 @@ -package io.github.dreamylost.plugin +package org.bitlap.tools.plugin /** * Mail: chk19940609@gmail.com @@ -7,7 +7,7 @@ package io.github.dreamylost.plugin */ object ScalaMacroNames { - private val NS = "io.github.dreamylost" + private val NS = "org.bitlap.tools" val BUILDER = s"$NS.builder" val LOG = s"$NS.log" val APPLY = s"$NS.apply" diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroProcessorProvider.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroProcessorProvider.scala similarity index 83% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroProcessorProvider.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroProcessorProvider.scala index a6ac875e..a8f4b3ce 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/ScalaMacroProcessorProvider.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/ScalaMacroProcessorProvider.scala @@ -1,8 +1,8 @@ -package io.github.dreamylost.plugin +package org.bitlap.tools.plugin import com.intellij.openapi.Disposable -import io.github.dreamylost.plugin.processor.Processor -import io.github.dreamylost.plugin.processor.clazz.{ ApplyProcessor, BuilderProcessor, ConstructorProcessor, EqualsAndHashCodeProcessor, JsonProcessor, LogProcessor } +import org.bitlap.tools.plugin.processor.Processor +import org.bitlap.tools.plugin.processor.clazz.{ ApplyProcessor, BuilderProcessor, ConstructorProcessor, EqualsAndHashCodeProcessor, JsonProcessor, LogProcessor } import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScObject, ScTypeDefinition } import scala.collection.mutable diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/AbsProcessor.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/AbsProcessor.scala similarity index 98% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/AbsProcessor.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/AbsProcessor.scala index d01d9ef7..de378958 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/AbsProcessor.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/AbsProcessor.scala @@ -1,4 +1,4 @@ -package io.github.dreamylost.plugin.processor +package org.bitlap.tools.plugin.processor import org.jetbrains.plugins.scala.lang.psi.api.base.ScMethodLike import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScClassParameter diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/ProcessType.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/ProcessType.scala similarity index 80% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/ProcessType.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/ProcessType.scala index fa4a1a42..baa00602 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/ProcessType.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/ProcessType.scala @@ -1,4 +1,4 @@ -package io.github.dreamylost.plugin.processor +package org.bitlap.tools.plugin.processor /** * Mail: chk19940609@gmail.com diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/Processor.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/Processor.scala similarity index 80% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/Processor.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/Processor.scala index 2f1ce2c4..be0fe9e8 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/Processor.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/Processor.scala @@ -1,6 +1,6 @@ -package io.github.dreamylost.plugin.processor +package org.bitlap.tools.plugin.processor -import io.github.dreamylost.plugin.processor.ProcessType.ProcessType +import org.bitlap.tools.plugin.processor.ProcessType.ProcessType import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTypeDefinition /** diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/ApplyProcessor.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/ApplyProcessor.scala similarity index 84% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/ApplyProcessor.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/ApplyProcessor.scala index df431966..0deef92d 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/ApplyProcessor.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/ApplyProcessor.scala @@ -1,7 +1,7 @@ -package io.github.dreamylost.plugin.processor.clazz +package org.bitlap.tools.plugin.processor.clazz -import io.github.dreamylost.plugin.processor.ProcessType.ProcessType -import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType } +import org.bitlap.tools.plugin.processor.ProcessType.ProcessType +import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType } import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScObject, ScTypeDefinition } /** diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/BuilderProcessor.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/BuilderProcessor.scala similarity index 92% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/BuilderProcessor.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/BuilderProcessor.scala index b025781c..ad816ef3 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/BuilderProcessor.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/BuilderProcessor.scala @@ -1,7 +1,7 @@ -package io.github.dreamylost.plugin.processor.clazz +package org.bitlap.tools.plugin.processor.clazz -import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType } -import io.github.dreamylost.plugin.processor.ProcessType.ProcessType +import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType } +import org.bitlap.tools.plugin.processor.ProcessType.ProcessType import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScObject, ScTypeDefinition } /** diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/ConstructorProcessor.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/ConstructorProcessor.scala similarity index 90% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/ConstructorProcessor.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/ConstructorProcessor.scala index 636a3354..9e37bc2b 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/ConstructorProcessor.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/ConstructorProcessor.scala @@ -1,8 +1,8 @@ -package io.github.dreamylost.plugin.processor.clazz +package org.bitlap.tools.plugin.processor.clazz -import io.github.dreamylost.plugin.ScalaMacroNames -import io.github.dreamylost.plugin.processor.ProcessType.ProcessType -import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType } +import org.bitlap.tools.plugin.ScalaMacroNames +import org.bitlap.tools.plugin.processor.ProcessType.ProcessType +import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType } import org.jetbrains.plugins.scala.lang.psi.api.expr.ScMethodCall import org.jetbrains.plugins.scala.lang.psi.api.statements.ScVariableDefinition import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScTypeDefinition } diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/EqualsAndHashCodeProcessor.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/EqualsAndHashCodeProcessor.scala similarity index 76% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/EqualsAndHashCodeProcessor.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/EqualsAndHashCodeProcessor.scala index b4cfaa4d..009337e0 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/EqualsAndHashCodeProcessor.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/EqualsAndHashCodeProcessor.scala @@ -1,7 +1,7 @@ -package io.github.dreamylost.plugin.processor.clazz +package org.bitlap.tools.plugin.processor.clazz -import io.github.dreamylost.plugin.processor.ProcessType.ProcessType -import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType } +import org.bitlap.tools.plugin.processor.ProcessType.ProcessType +import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType } import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScTypeDefinition } /** diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/JsonProcessor.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/JsonProcessor.scala similarity index 78% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/JsonProcessor.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/JsonProcessor.scala index c2f7811b..e4c88d6a 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/JsonProcessor.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/JsonProcessor.scala @@ -1,7 +1,7 @@ -package io.github.dreamylost.plugin.processor.clazz +package org.bitlap.tools.plugin.processor.clazz -import io.github.dreamylost.plugin.processor.ProcessType.ProcessType -import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType } +import org.bitlap.tools.plugin.processor.ProcessType.ProcessType +import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType } import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScObject, ScTypeDefinition } /** diff --git a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/LogProcessor.scala b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/LogProcessor.scala similarity index 82% rename from intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/LogProcessor.scala rename to intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/LogProcessor.scala index 219d5bc0..be8d7770 100644 --- a/intellij-plugin/src/main/scala/io/github/dreamylost/plugin/processor/clazz/LogProcessor.scala +++ b/intellij-plugin/src/main/scala/org/bitlap/tools/plugin/processor/clazz/LogProcessor.scala @@ -1,8 +1,8 @@ -package io.github.dreamylost.plugin.processor.clazz +package org.bitlap.tools.plugin.processor.clazz -import io.github.dreamylost.plugin.ScalaMacroNames -import io.github.dreamylost.plugin.processor.ProcessType.ProcessType -import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType } +import org.bitlap.tools.plugin.ScalaMacroNames +import org.bitlap.tools.plugin.processor.ProcessType.ProcessType +import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType } import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScObject, ScTypeDefinition } /** diff --git a/project/Publishing.scala b/project/Publishing.scala index 98ba581e..9adffae6 100644 --- a/project/Publishing.scala +++ b/project/Publishing.scala @@ -34,11 +34,11 @@ object Publishing { )), sonatypeProfileName := organization.value, isSnapshot := version.value endsWith "SNAPSHOT", - homepage := Some(url("https://github.com/jxnu-liguobin")), + homepage := Some(url("https://bitlap.org")), scmInfo := Some( ScmInfo( - url("https://github.com/jxnu-liguobin/scala-macro-tools"), - "scm:git@github.com:jxnu-liguobin/scala-macro-tools.git" + url("https://github.com/bitlap/scala-macro-tools"), + "scm:git@github.com:bitlap/scala-macro-tools.git" )) ) } diff --git a/src/main/scala/io/github/dreamylost/JavaCompatible.scala b/src/main/scala/org/bitlap/tools/JavaCompatible.scala similarity index 92% rename from src/main/scala/io/github/dreamylost/JavaCompatible.scala rename to src/main/scala/org/bitlap/tools/JavaCompatible.scala index 30cba325..dc1904eb 100644 --- a/src/main/scala/io/github/dreamylost/JavaCompatible.scala +++ b/src/main/scala/org/bitlap/tools/JavaCompatible.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,10 +19,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import scala.annotation.{ compileTimeOnly, StaticAnnotation } -import io.github.dreamylost.macros.javaCompatibleMacro +import org.bitlap.tools.macros.javaCompatibleMacro /** * annotation to generate non-parameter constructor and get/set method for case classes. diff --git a/src/main/scala/io/github/dreamylost/LogLevel.scala b/src/main/scala/org/bitlap/tools/LogLevel.scala similarity index 91% rename from src/main/scala/io/github/dreamylost/LogLevel.scala rename to src/main/scala/org/bitlap/tools/LogLevel.scala index 312da171..3a86b8e7 100644 --- a/src/main/scala/io/github/dreamylost/LogLevel.scala +++ b/src/main/scala/org/bitlap/tools/LogLevel.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools /** * Log Level for elapsed @@ -33,7 +33,7 @@ object LogLevel extends Enumeration { type LogLevel = Value val INFO, WARN, DEBUG = Value - private[dreamylost] def getLogLevel(shortType: String): LogLevel = { + private[bitlap] def getLogLevel(shortType: String): LogLevel = { val tpe1 = s"$PACKAGE.elapsed.$shortType" //LogLevel.INFO val tpe2 = s"$PACKAGE.elapsed.LogLevel.$shortType" // INFO val v = LogLevel.values.find(p => { diff --git a/src/main/scala/io/github/dreamylost/ProcessorCreator.scala b/src/main/scala/org/bitlap/tools/ProcessorCreator.scala similarity index 95% rename from src/main/scala/io/github/dreamylost/ProcessorCreator.scala rename to src/main/scala/org/bitlap/tools/ProcessorCreator.scala index eac8a3e2..f191c7e4 100644 --- a/src/main/scala/io/github/dreamylost/ProcessorCreator.scala +++ b/src/main/scala/org/bitlap/tools/ProcessorCreator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.ProcessorCreatorMacro +import org.bitlap.tools.macros.ProcessorCreatorMacro import java.util.concurrent.Executor diff --git a/src/main/scala/io/github/dreamylost/apply.scala b/src/main/scala/org/bitlap/tools/apply.scala similarity index 92% rename from src/main/scala/io/github/dreamylost/apply.scala rename to src/main/scala/org/bitlap/tools/apply.scala index 10c725c5..19ad1b9b 100644 --- a/src/main/scala/io/github/dreamylost/apply.scala +++ b/src/main/scala/org/bitlap/tools/apply.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.applyMacro +import org.bitlap.tools.macros.applyMacro import scala.annotation.{ StaticAnnotation, compileTimeOnly } diff --git a/src/main/scala/io/github/dreamylost/builder.scala b/src/main/scala/org/bitlap/tools/builder.scala similarity index 91% rename from src/main/scala/io/github/dreamylost/builder.scala rename to src/main/scala/org/bitlap/tools/builder.scala index 5fff8f0f..c728a8c8 100644 --- a/src/main/scala/io/github/dreamylost/builder.scala +++ b/src/main/scala/org/bitlap/tools/builder.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.builderMacro +import org.bitlap.tools.macros.builderMacro import scala.annotation.{ StaticAnnotation, compileTimeOnly } diff --git a/src/main/scala/io/github/dreamylost/constructor.scala b/src/main/scala/org/bitlap/tools/constructor.scala similarity index 92% rename from src/main/scala/io/github/dreamylost/constructor.scala rename to src/main/scala/org/bitlap/tools/constructor.scala index e2fe9e98..7d9091ec 100644 --- a/src/main/scala/io/github/dreamylost/constructor.scala +++ b/src/main/scala/org/bitlap/tools/constructor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.constructorMacro +import org.bitlap.tools.macros.constructorMacro import scala.annotation.{ StaticAnnotation, compileTimeOnly } diff --git a/src/main/scala/io/github/dreamylost/elapsed.scala b/src/main/scala/org/bitlap/tools/elapsed.scala similarity index 86% rename from src/main/scala/io/github/dreamylost/elapsed.scala rename to src/main/scala/org/bitlap/tools/elapsed.scala index b23e5432..0568f8ce 100644 --- a/src/main/scala/io/github/dreamylost/elapsed.scala +++ b/src/main/scala/org/bitlap/tools/elapsed.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,10 +19,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import LogLevel.LogLevel -import io.github.dreamylost.macros.elapsedMacro +import org.bitlap.tools.LogLevel.LogLevel +import org.bitlap.tools.macros.elapsedMacro.ElapsedProcessor import scala.annotation.{ StaticAnnotation, compileTimeOnly } import scala.concurrent.duration.Duration @@ -39,6 +39,6 @@ import scala.concurrent.duration.Duration @compileTimeOnly("enable macro to expand macro annotations") final class elapsed(limit: Duration, logLevel: LogLevel) extends StaticAnnotation { - def macroTransform(annottees: Any*): Any = macro elapsedMacro.ElapsedProcessor.impl + def macroTransform(annottees: Any*): Any = macro ElapsedProcessor.impl } diff --git a/src/main/scala/io/github/dreamylost/equalsAndHashCode.scala b/src/main/scala/org/bitlap/tools/equalsAndHashCode.scala similarity index 86% rename from src/main/scala/io/github/dreamylost/equalsAndHashCode.scala rename to src/main/scala/org/bitlap/tools/equalsAndHashCode.scala index 578fc81c..ec49c4d0 100644 --- a/src/main/scala/io/github/dreamylost/equalsAndHashCode.scala +++ b/src/main/scala/org/bitlap/tools/equalsAndHashCode.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.equalsAndHashCodeMacro +import org.bitlap.tools.macros.equalsAndHashCodeMacro.EqualsAndHashCodeProcessor import scala.annotation.{ StaticAnnotation, compileTimeOnly } @@ -40,5 +40,5 @@ final class equalsAndHashCode( excludeFields: Seq[String] = Nil ) extends StaticAnnotation { - def macroTransform(annottees: Any*): Any = macro equalsAndHashCodeMacro.EqualsAndHashCodeProcessor.impl + def macroTransform(annottees: Any*): Any = macro EqualsAndHashCodeProcessor.impl } diff --git a/src/main/scala/io/github/dreamylost/jacksonEnum.scala b/src/main/scala/org/bitlap/tools/jacksonEnum.scala similarity index 89% rename from src/main/scala/io/github/dreamylost/jacksonEnum.scala rename to src/main/scala/org/bitlap/tools/jacksonEnum.scala index ddfb5125..3cca49eb 100644 --- a/src/main/scala/io/github/dreamylost/jacksonEnum.scala +++ b/src/main/scala/org/bitlap/tools/jacksonEnum.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,11 +19,11 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.jacksonEnumMacro +import org.bitlap.tools.macros.jacksonEnumMacro -import scala.annotation.{ compileTimeOnly, StaticAnnotation } +import scala.annotation.{ StaticAnnotation, compileTimeOnly } /** * annotation to generate equals and hashcode method for classes. diff --git a/src/main/scala/io/github/dreamylost/json.scala b/src/main/scala/org/bitlap/tools/json.scala similarity index 92% rename from src/main/scala/io/github/dreamylost/json.scala rename to src/main/scala/org/bitlap/tools/json.scala index 0e525370..648cee35 100644 --- a/src/main/scala/io/github/dreamylost/json.scala +++ b/src/main/scala/org/bitlap/tools/json.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.jsonMacro +import org.bitlap.tools.macros.jsonMacro import scala.annotation.{ StaticAnnotation, compileTimeOnly } diff --git a/src/main/scala/io/github/dreamylost/log.scala b/src/main/scala/org/bitlap/tools/log.scala similarity index 87% rename from src/main/scala/io/github/dreamylost/log.scala rename to src/main/scala/org/bitlap/tools/log.scala index 07ea4d55..c9341cac 100644 --- a/src/main/scala/io/github/dreamylost/log.scala +++ b/src/main/scala/org/bitlap/tools/log.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,12 +19,12 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.logs._ -import io.github.dreamylost.macros.logMacro +import org.bitlap.tools.logs.LogType +import org.bitlap.tools.macros.logMacro -import scala.annotation.{ StaticAnnotation, compileTimeOnly } +import scala.annotation.{ compileTimeOnly, StaticAnnotation } /** * annotation to generate log. diff --git a/src/main/scala/io/github/dreamylost/logs/BaseLog.scala b/src/main/scala/org/bitlap/tools/logs/BaseLog.scala similarity index 90% rename from src/main/scala/io/github/dreamylost/logs/BaseLog.scala rename to src/main/scala/org/bitlap/tools/logs/BaseLog.scala index c392cd48..81989a06 100644 --- a/src/main/scala/io/github/dreamylost/logs/BaseLog.scala +++ b/src/main/scala/org/bitlap/tools/logs/BaseLog.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs +package org.bitlap.tools.logs -import io.github.dreamylost.logs.LogType.LogType +import org.bitlap.tools.logs.LogType.LogType import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/logs/JLogImpl.scala b/src/main/scala/org/bitlap/tools/logs/JLogImpl.scala similarity index 92% rename from src/main/scala/io/github/dreamylost/logs/JLogImpl.scala rename to src/main/scala/org/bitlap/tools/logs/JLogImpl.scala index 8ebd2b58..e8b7dae7 100644 --- a/src/main/scala/io/github/dreamylost/logs/JLogImpl.scala +++ b/src/main/scala/org/bitlap/tools/logs/JLogImpl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs +package org.bitlap.tools.logs -import io.github.dreamylost.logs.LogType.LogType +import org.bitlap.tools.logs.LogType.LogType import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/logs/Log4J2Impl.scala b/src/main/scala/org/bitlap/tools/logs/Log4J2Impl.scala similarity index 92% rename from src/main/scala/io/github/dreamylost/logs/Log4J2Impl.scala rename to src/main/scala/org/bitlap/tools/logs/Log4J2Impl.scala index 5e54d207..5e7d6f2f 100644 --- a/src/main/scala/io/github/dreamylost/logs/Log4J2Impl.scala +++ b/src/main/scala/org/bitlap/tools/logs/Log4J2Impl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs +package org.bitlap.tools.logs -import io.github.dreamylost.logs.LogType.LogType +import org.bitlap.tools.logs.LogType.LogType import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/logs/LogTransferArgument.scala b/src/main/scala/org/bitlap/tools/logs/LogTransferArgument.scala similarity index 93% rename from src/main/scala/io/github/dreamylost/logs/LogTransferArgument.scala rename to src/main/scala/org/bitlap/tools/logs/LogTransferArgument.scala index 01973154..fa4a91e2 100644 --- a/src/main/scala/io/github/dreamylost/logs/LogTransferArgument.scala +++ b/src/main/scala/org/bitlap/tools/logs/LogTransferArgument.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs +package org.bitlap.tools.logs /** * diff --git a/src/main/scala/io/github/dreamylost/logs/LogType.scala b/src/main/scala/org/bitlap/tools/logs/LogType.scala similarity index 84% rename from src/main/scala/io/github/dreamylost/logs/LogType.scala rename to src/main/scala/org/bitlap/tools/logs/LogType.scala index cfc3134c..7bf0ac2b 100644 --- a/src/main/scala/io/github/dreamylost/logs/LogType.scala +++ b/src/main/scala/org/bitlap/tools/logs/LogType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,10 +19,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs +package org.bitlap.tools.logs -import io.github.dreamylost.PACKAGE -import io.github.dreamylost.logs.extension.{ ScalaLoggingLazyImpl, ScalaLoggingStrictImpl } +import org.bitlap.tools.PACKAGE +import org.bitlap.tools.logs.extension.{ ScalaLoggingLazyImpl, ScalaLoggingStrictImpl } object LogType extends Enumeration { @@ -37,11 +37,11 @@ object LogType extends Enumeration { ScalaLoggingLazy -> ScalaLoggingLazyImpl ) - private[dreamylost] def getLogImpl(logType: LogType): BaseLog = { + def getLogImpl(logType: LogType): BaseLog = { types.getOrElse(logType, default = throw new Exception(s"Not support log type: $logType")) } - private[dreamylost] def getLogType(shortType: String): LogType = { + def getLogType(shortType: String): LogType = { val tpe1 = s"$PACKAGE.logs.$shortType" //LogType.JLog val tpe2 = s"$PACKAGE.logs.LogType.$shortType" // JLog val v = LogType.values.find(p => { diff --git a/src/main/scala/io/github/dreamylost/logs/Slf4jImpl.scala b/src/main/scala/org/bitlap/tools/logs/Slf4jImpl.scala similarity index 92% rename from src/main/scala/io/github/dreamylost/logs/Slf4jImpl.scala rename to src/main/scala/org/bitlap/tools/logs/Slf4jImpl.scala index 95690b6a..2eef922b 100644 --- a/src/main/scala/io/github/dreamylost/logs/Slf4jImpl.scala +++ b/src/main/scala/org/bitlap/tools/logs/Slf4jImpl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs +package org.bitlap.tools.logs -import io.github.dreamylost.logs.LogType.LogType +import org.bitlap.tools.logs.LogType.LogType import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/logs/extension/ScalaLazyLogging.scala b/src/main/scala/org/bitlap/tools/logs/extension/ScalaLazyLogging.scala similarity index 93% rename from src/main/scala/io/github/dreamylost/logs/extension/ScalaLazyLogging.scala rename to src/main/scala/org/bitlap/tools/logs/extension/ScalaLazyLogging.scala index b943b0df..97ac21e8 100644 --- a/src/main/scala/io/github/dreamylost/logs/extension/ScalaLazyLogging.scala +++ b/src/main/scala/org/bitlap/tools/logs/extension/ScalaLazyLogging.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs.extension +package org.bitlap.tools.logs.extension import org.slf4j.LoggerFactory diff --git a/src/main/scala/io/github/dreamylost/logs/extension/ScalaLoggingLazyImpl.scala b/src/main/scala/org/bitlap/tools/logs/extension/ScalaLoggingLazyImpl.scala similarity index 83% rename from src/main/scala/io/github/dreamylost/logs/extension/ScalaLoggingLazyImpl.scala rename to src/main/scala/org/bitlap/tools/logs/extension/ScalaLoggingLazyImpl.scala index 07df6a49..b9d05fd8 100644 --- a/src/main/scala/io/github/dreamylost/logs/extension/ScalaLoggingLazyImpl.scala +++ b/src/main/scala/org/bitlap/tools/logs/extension/ScalaLoggingLazyImpl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,10 +19,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs.extension +package org.bitlap.tools.logs.extension -import io.github.dreamylost.logs.LogType.LogType -import io.github.dreamylost.logs.{ BaseLog, LogTransferArgument, LogType } +import org.bitlap.tools.logs.LogType.LogType +import org.bitlap.tools.logs.{ BaseLog, LogTransferArgument, LogType } import scala.reflect.macros.whitebox @@ -39,6 +39,6 @@ object ScalaLoggingLazyImpl extends BaseLog { override def getTemplate(c: whitebox.Context)(logTransferArgument: LogTransferArgument): c.Tree = { import c.universe._ - tq"_root_.io.github.dreamylost.logs.extension.ScalaLazyLogging" + tq"_root_.org.bitlap.tools.logs.extension.ScalaLazyLogging" } } diff --git a/src/main/scala/io/github/dreamylost/logs/extension/ScalaLoggingStrictImpl.scala b/src/main/scala/org/bitlap/tools/logs/extension/ScalaLoggingStrictImpl.scala similarity index 83% rename from src/main/scala/io/github/dreamylost/logs/extension/ScalaLoggingStrictImpl.scala rename to src/main/scala/org/bitlap/tools/logs/extension/ScalaLoggingStrictImpl.scala index f7bed4d4..9235214a 100644 --- a/src/main/scala/io/github/dreamylost/logs/extension/ScalaLoggingStrictImpl.scala +++ b/src/main/scala/org/bitlap/tools/logs/extension/ScalaLoggingStrictImpl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,10 +19,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs.extension +package org.bitlap.tools.logs.extension -import io.github.dreamylost.logs.LogType.LogType -import io.github.dreamylost.logs.{ BaseLog, LogTransferArgument, LogType } +import org.bitlap.tools.logs.LogType.LogType +import org.bitlap.tools.logs.{ BaseLog, LogTransferArgument, LogType } import scala.reflect.macros.whitebox @@ -39,6 +39,6 @@ object ScalaLoggingStrictImpl extends BaseLog { override def getTemplate(c: whitebox.Context)(logTransferArgument: LogTransferArgument): c.Tree = { import c.universe._ - tq"_root_.io.github.dreamylost.logs.extension.ScalaStrictLogging" + tq"_root_.org.bitlap.tools.logs.extension.ScalaStrictLogging" } } diff --git a/src/main/scala/io/github/dreamylost/logs/extension/ScalaStrictLogging.scala b/src/main/scala/org/bitlap/tools/logs/extension/ScalaStrictLogging.scala similarity index 93% rename from src/main/scala/io/github/dreamylost/logs/extension/ScalaStrictLogging.scala rename to src/main/scala/org/bitlap/tools/logs/extension/ScalaStrictLogging.scala index 493264f6..253d3cf4 100644 --- a/src/main/scala/io/github/dreamylost/logs/extension/ScalaStrictLogging.scala +++ b/src/main/scala/org/bitlap/tools/logs/extension/ScalaStrictLogging.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.logs.extension +package org.bitlap.tools.logs.extension import org.slf4j.LoggerFactory diff --git a/src/main/scala/io/github/dreamylost/macros/AbstractMacroProcessor.scala b/src/main/scala/org/bitlap/tools/macros/AbstractMacroProcessor.scala similarity index 97% rename from src/main/scala/io/github/dreamylost/macros/AbstractMacroProcessor.scala rename to src/main/scala/org/bitlap/tools/macros/AbstractMacroProcessor.scala index 0a4b99a4..bb65979c 100644 --- a/src/main/scala/io/github/dreamylost/macros/AbstractMacroProcessor.scala +++ b/src/main/scala/org/bitlap/tools/macros/AbstractMacroProcessor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import java.time.ZonedDateTime import java.time.format.DateTimeFormatter @@ -358,10 +358,10 @@ abstract class AbstractMacroProcessor(val c: whitebox.Context) { } /** - * Retrieves the accessor fields on a class and returns a Seq of [[io.github.dreamylost.macros.AbstractMacroProcessor#ValDefAccessor]]. + * Retrieves the accessor fields on a class and returns a Seq of [[org.bitlap.tools.macros.AbstractMacroProcessor#ValDefAccessor]]. * * @param params The list of params retrieved from the class - * @return Return a sequence of [[io.github.dreamylost.macros.AbstractMacroProcessor#ValDefAccessor]] + * @return Return a sequence of [[org.bitlap.tools.macros.AbstractMacroProcessor#ValDefAccessor]] */ def valDefAccessors(params: Seq[Tree]): Seq[ValDefAccessor] = { params.map { @@ -374,7 +374,7 @@ abstract class AbstractMacroProcessor(val c: whitebox.Context) { * Extract the necessary structure information of the class for macro programming. * * @param classDecl - * @return Return the expansion of the class definition as [[io.github.dreamylost.macros.AbstractMacroProcessor#ClassDefinition]] + * @return Return the expansion of the class definition as [[org.bitlap.tools.macros.AbstractMacroProcessor#ClassDefinition]] */ def mapToClassDeclInfo(classDecl: ClassDef): ClassDefinition = { val q"$mods class $tpname[..$tparams] $ctorMods(...$paramss) extends { ..$earlydefns } with ..$parents { $self => ..$stats }" = classDecl @@ -387,7 +387,7 @@ abstract class AbstractMacroProcessor(val c: whitebox.Context) { * Extract the necessary structure information of the moduleDef for macro programming. * * @param moduleDef - * @return Return the expansion of the class definition as [[io.github.dreamylost.macros.AbstractMacroProcessor#ClassDefinition]] + * @return Return the expansion of the class definition as [[org.bitlap.tools.macros.AbstractMacroProcessor#ClassDefinition]] */ def mapToModuleDeclInfo(moduleDef: ModuleDef): ClassDefinition = { val q"$mods object $tpname extends { ..$earlydefns } with ..$parents { $self => ..$stats }" = moduleDef diff --git a/src/main/scala/io/github/dreamylost/macros/Creator.scala b/src/main/scala/org/bitlap/tools/macros/Creator.scala similarity index 94% rename from src/main/scala/io/github/dreamylost/macros/Creator.scala rename to src/main/scala/org/bitlap/tools/macros/Creator.scala index 2eccb2c1..4a0737d3 100644 --- a/src/main/scala/io/github/dreamylost/macros/Creator.scala +++ b/src/main/scala/org/bitlap/tools/macros/Creator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.runtime.currentMirror import scala.reflect.runtime.universe._ diff --git a/src/main/scala/io/github/dreamylost/macros/MacroCache.scala b/src/main/scala/org/bitlap/tools/macros/MacroCache.scala similarity index 93% rename from src/main/scala/io/github/dreamylost/macros/MacroCache.scala rename to src/main/scala/org/bitlap/tools/macros/MacroCache.scala index a119834d..0a3aa0ac 100644 --- a/src/main/scala/io/github/dreamylost/macros/MacroCache.scala +++ b/src/main/scala/org/bitlap/tools/macros/MacroCache.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros object MacroCache { diff --git a/src/main/scala/io/github/dreamylost/macros/ProcessorCreatorMacro.scala b/src/main/scala/org/bitlap/tools/macros/ProcessorCreatorMacro.scala similarity index 98% rename from src/main/scala/io/github/dreamylost/macros/ProcessorCreatorMacro.scala rename to src/main/scala/org/bitlap/tools/macros/ProcessorCreatorMacro.scala index 43209291..1f2c5436 100644 --- a/src/main/scala/io/github/dreamylost/macros/ProcessorCreatorMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/ProcessorCreatorMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.blackbox import java.time.ZonedDateTime @@ -165,7 +165,7 @@ object ProcessorCreatorMacro { $processException(service, rpcCtx, exception) } } - val service = new io.github.dreamylost.macros.Creator[$serviceType].createInstance(null)(0) + val service = new org.bitlap.tools.macros.Creator[$serviceType].createInstance(null)(0) new $className(service) """ printTree[RRP](c)(processor) diff --git a/src/main/scala/io/github/dreamylost/macros/applyMacro.scala b/src/main/scala/org/bitlap/tools/macros/applyMacro.scala similarity index 96% rename from src/main/scala/io/github/dreamylost/macros/applyMacro.scala rename to src/main/scala/org/bitlap/tools/macros/applyMacro.scala index bc93bdbb..ca716919 100644 --- a/src/main/scala/io/github/dreamylost/macros/applyMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/applyMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/builderMacro.scala b/src/main/scala/org/bitlap/tools/macros/builderMacro.scala similarity index 97% rename from src/main/scala/io/github/dreamylost/macros/builderMacro.scala rename to src/main/scala/org/bitlap/tools/macros/builderMacro.scala index 786f12b8..d6c24094 100644 --- a/src/main/scala/io/github/dreamylost/macros/builderMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/builderMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/constructorMacro.scala b/src/main/scala/org/bitlap/tools/macros/constructorMacro.scala similarity index 98% rename from src/main/scala/io/github/dreamylost/macros/constructorMacro.scala rename to src/main/scala/org/bitlap/tools/macros/constructorMacro.scala index fde13e0e..6a6d65aa 100644 --- a/src/main/scala/io/github/dreamylost/macros/constructorMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/constructorMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/elapsedMacro.scala b/src/main/scala/org/bitlap/tools/macros/elapsedMacro.scala similarity index 97% rename from src/main/scala/io/github/dreamylost/macros/elapsedMacro.scala rename to src/main/scala/org/bitlap/tools/macros/elapsedMacro.scala index a111a4d2..425123e7 100644 --- a/src/main/scala/io/github/dreamylost/macros/elapsedMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/elapsedMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,10 +19,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros -import io.github.dreamylost.LogLevel.LogLevel -import io.github.dreamylost.{ LogLevel, PACKAGE } +import org.bitlap.tools.LogLevel.LogLevel +import org.bitlap.tools.{ LogLevel, PACKAGE } import scala.concurrent.duration._ import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/equalsAndHashCodeMacro.scala b/src/main/scala/org/bitlap/tools/macros/equalsAndHashCodeMacro.scala similarity index 98% rename from src/main/scala/io/github/dreamylost/macros/equalsAndHashCodeMacro.scala rename to src/main/scala/org/bitlap/tools/macros/equalsAndHashCodeMacro.scala index e40ed327..bebc49e1 100644 --- a/src/main/scala/io/github/dreamylost/macros/equalsAndHashCodeMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/equalsAndHashCodeMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/jacksonEnumMacro.scala b/src/main/scala/org/bitlap/tools/macros/jacksonEnumMacro.scala similarity index 98% rename from src/main/scala/io/github/dreamylost/macros/jacksonEnumMacro.scala rename to src/main/scala/org/bitlap/tools/macros/jacksonEnumMacro.scala index 37ab01b1..780b65d6 100644 --- a/src/main/scala/io/github/dreamylost/macros/jacksonEnumMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/jacksonEnumMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/javaCompatibleMacro.scala b/src/main/scala/org/bitlap/tools/macros/javaCompatibleMacro.scala similarity index 98% rename from src/main/scala/io/github/dreamylost/macros/javaCompatibleMacro.scala rename to src/main/scala/org/bitlap/tools/macros/javaCompatibleMacro.scala index d5a5fc73..e48068f9 100644 --- a/src/main/scala/io/github/dreamylost/macros/javaCompatibleMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/javaCompatibleMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/jsonMacro.scala b/src/main/scala/org/bitlap/tools/macros/jsonMacro.scala similarity index 96% rename from src/main/scala/io/github/dreamylost/macros/jsonMacro.scala rename to src/main/scala/org/bitlap/tools/macros/jsonMacro.scala index 6227c607..fdcf8a27 100644 --- a/src/main/scala/io/github/dreamylost/macros/jsonMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/jsonMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/logMacro.scala b/src/main/scala/org/bitlap/tools/macros/logMacro.scala similarity index 94% rename from src/main/scala/io/github/dreamylost/macros/logMacro.scala rename to src/main/scala/org/bitlap/tools/macros/logMacro.scala index f0be5942..f7ed3660 100644 --- a/src/main/scala/io/github/dreamylost/macros/logMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/logMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,11 +19,11 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros -import io.github.dreamylost.logs.LogType._ -import io.github.dreamylost.logs.{ LogTransferArgument, LogType } -import io.github.dreamylost.{ PACKAGE, logs } +import org.bitlap.tools.logs.LogType._ +import org.bitlap.tools.logs.{ LogTransferArgument, LogType } +import org.bitlap.tools.{ PACKAGE, logs } import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/macros.scala b/src/main/scala/org/bitlap/tools/macros/macros.scala similarity index 95% rename from src/main/scala/io/github/dreamylost/macros/macros.scala rename to src/main/scala/org/bitlap/tools/macros/macros.scala index 81dcee8f..a83f4f9e 100644 --- a/src/main/scala/io/github/dreamylost/macros/macros.scala +++ b/src/main/scala/org/bitlap/tools/macros/macros.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools /** * diff --git a/src/main/scala/io/github/dreamylost/macros/synchronizedMacro.scala b/src/main/scala/org/bitlap/tools/macros/synchronizedMacro.scala similarity index 96% rename from src/main/scala/io/github/dreamylost/macros/synchronizedMacro.scala rename to src/main/scala/org/bitlap/tools/macros/synchronizedMacro.scala index 3a783de2..4477c89c 100644 --- a/src/main/scala/io/github/dreamylost/macros/synchronizedMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/synchronizedMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/macros/toStringMacro.scala b/src/main/scala/org/bitlap/tools/macros/toStringMacro.scala similarity index 98% rename from src/main/scala/io/github/dreamylost/macros/toStringMacro.scala rename to src/main/scala/org/bitlap/tools/macros/toStringMacro.scala index 67bc4b94..e5721602 100644 --- a/src/main/scala/io/github/dreamylost/macros/toStringMacro.scala +++ b/src/main/scala/org/bitlap/tools/macros/toStringMacro.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost.macros +package org.bitlap.tools.macros import scala.reflect.macros.whitebox diff --git a/src/main/scala/io/github/dreamylost/package.scala b/src/main/scala/org/bitlap/tools/package.scala similarity index 88% rename from src/main/scala/io/github/dreamylost/package.scala rename to src/main/scala/org/bitlap/tools/package.scala index 905da08c..b970f029 100644 --- a/src/main/scala/io/github/dreamylost/package.scala +++ b/src/main/scala/org/bitlap/tools/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github +package org.bitlap /** * @@ -27,6 +27,6 @@ package io.github * @since 2021/7/7 * @version 1.0 */ -package object dreamylost { - final val PACKAGE = "io.github.dreamylost" +package object tools { + final val PACKAGE = "org.bitlap.tools" } diff --git a/src/main/scala/io/github/dreamylost/synchronized.scala b/src/main/scala/org/bitlap/tools/synchronized.scala similarity index 87% rename from src/main/scala/io/github/dreamylost/synchronized.scala rename to src/main/scala/org/bitlap/tools/synchronized.scala index c79059a1..9a4589e8 100644 --- a/src/main/scala/io/github/dreamylost/synchronized.scala +++ b/src/main/scala/org/bitlap/tools/synchronized.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.synchronizedMacro +import org.bitlap.tools.macros.synchronizedMacro.SynchronizedProcessor import scala.annotation.{ StaticAnnotation, compileTimeOnly } @@ -39,5 +39,6 @@ final class synchronized( verbose: Boolean = false, lockedName: String = "this" ) extends StaticAnnotation { - def macroTransform(annottees: Any*): Any = macro synchronizedMacro.SynchronizedProcessor.impl + + def macroTransform(annottees: Any*): Any = macro SynchronizedProcessor.impl } diff --git a/src/main/scala/io/github/dreamylost/toString.scala b/src/main/scala/org/bitlap/tools/toString.scala similarity index 93% rename from src/main/scala/io/github/dreamylost/toString.scala rename to src/main/scala/org/bitlap/tools/toString.scala index 2a74c7ae..1d350652 100644 --- a/src/main/scala/io/github/dreamylost/toString.scala +++ b/src/main/scala/org/bitlap/tools/toString.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.macros.toStringMacro +import org.bitlap.tools.macros.toStringMacro import scala.annotation.{ StaticAnnotation, compileTimeOnly } @@ -43,5 +43,6 @@ final class toString( includeFieldNames: Boolean = true, callSuper: Boolean = false ) extends StaticAnnotation { + def macroTransform(annottees: Any*): Any = macro toStringMacro.ToStringProcessor.impl } diff --git a/src/test/proto/schema.proto b/src/test/proto/schema.proto index 92882430..e27b5618 100644 --- a/src/test/proto/schema.proto +++ b/src/test/proto/schema.proto @@ -1,7 +1,7 @@ //Test for Processable and ProcessorCreator syntax = "proto3"; -option java_package = "io.github.dreamylost.test.proto"; +option java_package = "org.bitlap.tools.test.proto"; option java_multiple_files = true; option java_outer_classname = "DriverService"; diff --git a/src/test/scala/io/github/dreamylost/ApplyTest.scala b/src/test/scala/org/bitlap/tools/ApplyTest.scala similarity index 97% rename from src/test/scala/io/github/dreamylost/ApplyTest.scala rename to src/test/scala/org/bitlap/tools/ApplyTest.scala index 82ff2add..3880773c 100644 --- a/src/test/scala/io/github/dreamylost/ApplyTest.scala +++ b/src/test/scala/org/bitlap/tools/ApplyTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers diff --git a/src/test/scala/io/github/dreamylost/BuilderTest.scala b/src/test/scala/org/bitlap/tools/BuilderTest.scala similarity index 95% rename from src/test/scala/io/github/dreamylost/BuilderTest.scala rename to src/test/scala/org/bitlap/tools/BuilderTest.scala index 9f1739b8..bcf28241 100644 --- a/src/test/scala/io/github/dreamylost/BuilderTest.scala +++ b/src/test/scala/org/bitlap/tools/BuilderTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers @@ -38,7 +38,7 @@ class BuilderTest extends AnyFlatSpec with Matchers { // field : val i: Int = 0, so default value is "_" val ret = TestClass1.builder().i(1).j(0).x("x").build() println(ret) - assert(TestClass1.builder().getClass.getTypeName == "io.github.dreamylost.BuilderTest$TestClass1$2$TestClass1Builder") + assert(TestClass1.builder().getClass.getTypeName == "org.bitlap.tools.BuilderTest$TestClass1$2$TestClass1Builder") assert(ret.toString == "TestClass1(1,0,x,Some())") } diff --git a/src/test/scala/io/github/dreamylost/ConstructorTest.scala b/src/test/scala/org/bitlap/tools/ConstructorTest.scala similarity index 98% rename from src/test/scala/io/github/dreamylost/ConstructorTest.scala rename to src/test/scala/org/bitlap/tools/ConstructorTest.scala index 28690b6e..207ac25a 100644 --- a/src/test/scala/io/github/dreamylost/ConstructorTest.scala +++ b/src/test/scala/org/bitlap/tools/ConstructorTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers diff --git a/src/test/scala/io/github/dreamylost/CreatorTest.scala b/src/test/scala/org/bitlap/tools/CreatorTest.scala similarity index 88% rename from src/test/scala/io/github/dreamylost/CreatorTest.scala rename to src/test/scala/org/bitlap/tools/CreatorTest.scala index c07f0102..4292ef3f 100644 --- a/src/test/scala/io/github/dreamylost/CreatorTest.scala +++ b/src/test/scala/org/bitlap/tools/CreatorTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers @@ -32,7 +32,7 @@ import org.scalatest.matchers.should.Matchers */ class CreatorTest extends AnyFlatSpec with Matchers { "Creator" should "ok" in { - val service = new io.github.dreamylost.macros.Creator[NetService]().createInstance(null)(0) + val service = new org.bitlap.tools.macros.Creator[NetService]().createInstance(null)(0) println(service.openSession("1", "2")) } } diff --git a/src/test/scala/io/github/dreamylost/ElapsedTest.scala b/src/test/scala/org/bitlap/tools/ElapsedTest.scala similarity index 78% rename from src/test/scala/io/github/dreamylost/ElapsedTest.scala rename to src/test/scala/org/bitlap/tools/ElapsedTest.scala index 093c56d0..0565a8fd 100644 --- a/src/test/scala/io/github/dreamylost/ElapsedTest.scala +++ b/src/test/scala/org/bitlap/tools/ElapsedTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers @@ -38,22 +38,22 @@ class ElapsedTest extends AnyFlatSpec with Matchers { //Duration and TimeUnit must Full class name """ | class A { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def i = ??? | } | | class B { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.WARN) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.WARN) | def j = ??? | } | | class C { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.DEBUG) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.DEBUG) | def j = ??? | } | | class D { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def i:String = ??? | } | val a = new A() @@ -67,13 +67,13 @@ class ElapsedTest extends AnyFlatSpec with Matchers { //Duration and TimeUnit must Full class name """ |class A { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.NANOSECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.NANOSECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloWorld: String = { | println("hello world") | "hello" | } | - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloScala: String = { | Thread.sleep(2000) | println("hello world") @@ -90,18 +90,18 @@ class ElapsedTest extends AnyFlatSpec with Matchers { //Duration and TimeUnit must Full class name """ | class A { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.NANOSECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.NANOSECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloWorld: String = { | println("") ; println(""); "" | } | - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloScala1: String = { println("") ; println(""); ""} | - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloScala2: String = { println("") ; println(""); "" } | - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloScala3: String = { | val s = "hello" | val x = "world" @@ -116,7 +116,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { //Duration and TimeUnit must Full class name """ | class A { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloScala1: String = { | val s = "hello" | if (s == "hello") { @@ -131,7 +131,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { | a.helloScala1 | | class B { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloScala11: String = { | val s = "hello" | if (s == "hello") { @@ -151,13 +151,13 @@ class ElapsedTest extends AnyFlatSpec with Matchers { private final val log3: org.slf4j.Logger = org.slf4j.LoggerFactory.getLogger(classOf[A]) - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) def helloScala1: Future[String] = { Thread.sleep(1000) Future.successful("hello world") } - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.DEBUG) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.DEBUG) def helloScala2: Future[String] = { Thread.sleep(2000) Future { @@ -165,7 +165,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { }(scala.concurrent.ExecutionContext.Implicits.global) } - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.WARN) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.WARN) def helloScala3: Future[String] = Future { "hello world" }(scala.concurrent.ExecutionContext.Implicits.global) @@ -178,15 +178,15 @@ class ElapsedTest extends AnyFlatSpec with Matchers { import scala.concurrent.Await import scala.concurrent.duration.Duration - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.WARN) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.WARN) def helloScala(t: String): Future[String] = { Future(t)(scala.concurrent.ExecutionContext.Implicits.global) } - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.WARN) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.WARN) def helloScala11(t: String): Future[String] = Future(t)(scala.concurrent.ExecutionContext.Implicits.global) - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) def helloScala2: String = { val s = Future("")(scala.concurrent.ExecutionContext.Implicits.global) Await.result(helloScala("world"), Duration.Inf) @@ -199,13 +199,13 @@ class ElapsedTest extends AnyFlatSpec with Matchers { | object A { | private final val log1: org.slf4j.Logger = org.slf4j.LoggerFactory.getLogger(A.getClass) | - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) | def helloScala1: Future[String] = { | Thread.sleep(1000) | Future.successful("hello world") | } | - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.DEBUG) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.DEBUG) | def helloScala2: Future[String] = { | Thread.sleep(2000) | Future { @@ -213,7 +213,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { | }(scala.concurrent.ExecutionContext.Implicits.global) | } | - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.WARN) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.WARN) | def helloScala3: Future[String] = Future { | "hello world" | }(scala.concurrent.ExecutionContext.Implicits.global) @@ -228,7 +228,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { println("") "hello" } - import io.github.dreamylost.LogLevel.WARN + import org.bitlap.tools.LogLevel.WARN @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = WARN) def helloScala2: String = { println("") @@ -236,7 +236,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { "hello" } - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.WARN) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.WARN) def helloScala3: String = { println("") println("") @@ -246,7 +246,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { "elapsed9" should "failed at input args" in { """ - |@elapsed(logLevel = io.github.dreamylost.LogLevel.WARN, limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS)) + |@elapsed(logLevel = org.bitlap.tools.LogLevel.WARN, limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS)) | def helloScala1: String = { | println("") | println("") @@ -257,7 +257,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { "elapsed10" should "multi-return" in { class A { - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) def j: Int = { var i = 1 if (i == 1) { @@ -277,7 +277,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { i } - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) def k: Unit = { var i = 1 if (i == 1) { @@ -309,7 +309,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { 1 } - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) def l: Int = { val i = 0 for (i <- Seq(1)) { @@ -320,7 +320,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { 0 } - @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.INFO) + @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.INFO) def m: Int = { var i = 1 if (i == 1) { @@ -345,7 +345,7 @@ class ElapsedTest extends AnyFlatSpec with Matchers { "elapsed11" should "failed at abstract method" in { """ |abstract class A { - | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = io.github.dreamylost.LogLevel.WARN) + | @elapsed(limit = scala.concurrent.duration.Duration(1, java.util.concurrent.TimeUnit.SECONDS), logLevel = org.bitlap.tools.LogLevel.WARN) | def hello:String | } |""".stripMargin shouldNot compile diff --git a/src/test/scala/io/github/dreamylost/EmployeeTests.scala b/src/test/scala/org/bitlap/tools/EmployeeTests.scala similarity index 97% rename from src/test/scala/io/github/dreamylost/EmployeeTests.scala rename to src/test/scala/org/bitlap/tools/EmployeeTests.scala index 479d29c4..e5de94a6 100644 --- a/src/test/scala/io/github/dreamylost/EmployeeTests.scala +++ b/src/test/scala/org/bitlap/tools/EmployeeTests.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers diff --git a/src/test/scala/io/github/dreamylost/EqualsAndHashCodeTest.scala b/src/test/scala/org/bitlap/tools/EqualsAndHashCodeTest.scala similarity index 98% rename from src/test/scala/io/github/dreamylost/EqualsAndHashCodeTest.scala rename to src/test/scala/org/bitlap/tools/EqualsAndHashCodeTest.scala index d9258d5d..21301266 100644 --- a/src/test/scala/io/github/dreamylost/EqualsAndHashCodeTest.scala +++ b/src/test/scala/org/bitlap/tools/EqualsAndHashCodeTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers diff --git a/src/test/scala/io/github/dreamylost/JacksonEnumTest.scala b/src/test/scala/org/bitlap/tools/JacksonEnumTest.scala similarity index 97% rename from src/test/scala/io/github/dreamylost/JacksonEnumTest.scala rename to src/test/scala/org/bitlap/tools/JacksonEnumTest.scala index f2e5decf..04e707b3 100644 --- a/src/test/scala/io/github/dreamylost/JacksonEnumTest.scala +++ b/src/test/scala/org/bitlap/tools/JacksonEnumTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import com.fasterxml.jackson.module.scala.JsonScalaEnumeration import org.scalatest.flatspec.AnyFlatSpec diff --git a/src/test/scala/io/github/dreamylost/JavaCompatibleTest.scala b/src/test/scala/org/bitlap/tools/JavaCompatibleTest.scala similarity index 97% rename from src/test/scala/io/github/dreamylost/JavaCompatibleTest.scala rename to src/test/scala/org/bitlap/tools/JavaCompatibleTest.scala index 98d37db3..2b0cb07a 100644 --- a/src/test/scala/io/github/dreamylost/JavaCompatibleTest.scala +++ b/src/test/scala/org/bitlap/tools/JavaCompatibleTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers diff --git a/src/test/scala/io/github/dreamylost/JsonTest.scala b/src/test/scala/org/bitlap/tools/JsonTest.scala similarity index 97% rename from src/test/scala/io/github/dreamylost/JsonTest.scala rename to src/test/scala/org/bitlap/tools/JsonTest.scala index f3212450..05631bf3 100644 --- a/src/test/scala/io/github/dreamylost/JsonTest.scala +++ b/src/test/scala/org/bitlap/tools/JsonTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import play.api.libs.json.Json import org.scalatest.flatspec.AnyFlatSpec diff --git a/src/test/scala/io/github/dreamylost/LogMain.scala b/src/test/scala/org/bitlap/tools/LogMain.scala similarity index 95% rename from src/test/scala/io/github/dreamylost/LogMain.scala rename to src/test/scala/org/bitlap/tools/LogMain.scala index ded4fdcd..b78ef5e5 100644 --- a/src/test/scala/io/github/dreamylost/LogMain.scala +++ b/src/test/scala/org/bitlap/tools/LogMain.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools /** * diff --git a/src/test/scala/io/github/dreamylost/LogTest.scala b/src/test/scala/org/bitlap/tools/LogTest.scala similarity index 66% rename from src/test/scala/io/github/dreamylost/LogTest.scala rename to src/test/scala/org/bitlap/tools/LogTest.scala index 974c46cf..4888e6b3 100644 --- a/src/test/scala/io/github/dreamylost/LogTest.scala +++ b/src/test/scala/org/bitlap/tools/LogTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,9 +19,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools -import io.github.dreamylost.logs.LogType +import org.bitlap.tools.logs.LogType import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers @@ -41,8 +41,8 @@ class LogTest extends AnyFlatSpec with Matchers { """@log class TestClass2(val i: Int = 0, var j: Int)""" should compile """@log() class TestClass3(val i: Int = 0, var j: Int)""" should compile """@log(verbose=true) class TestClass4(val i: Int = 0, var j: Int)""" should compile - """@log(logType=io.github.dreamylost.logs.LogType.JLog) class TestClass5(val i: Int = 0, var j: Int)""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.JLog) class TestClass6(val i: Int = 0, var j: Int)""" should compile + """@log(logType=org.bitlap.tools.logs.LogType.JLog) class TestClass5(val i: Int = 0, var j: Int)""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.JLog) class TestClass6(val i: Int = 0, var j: Int)""" should compile } "log3" should "ok on object" in { @@ -53,8 +53,8 @@ class LogTest extends AnyFlatSpec with Matchers { """@log object TestClass2""" should compile """@log() object TestClass3""" should compile """@log(verbose=true) object TestClass4""" should compile - """@log(logType=io.github.dreamylost.logs.LogType.JLog) object TestClass5""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.JLog) object TestClass6""" should compile + """@log(logType=org.bitlap.tools.logs.LogType.JLog) object TestClass5""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.JLog) object TestClass6""" should compile } "log4 log4j2" should "ok on object" in { @@ -65,8 +65,8 @@ class LogTest extends AnyFlatSpec with Matchers { """@log object TestClass2""" should compile """@log() object TestClass3""" should compile """@log(verbose=true) object TestClass4""" should compile - """@log(logType=io.github.dreamylost.logs.LogType.Log4j2) object TestClass5""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.Log4j2) object TestClass6""" should compile + """@log(logType=org.bitlap.tools.logs.LogType.Log4j2) object TestClass5""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.Log4j2) object TestClass6""" should compile } "log5 slf4j" should "ok on object" in { @@ -77,8 +77,8 @@ class LogTest extends AnyFlatSpec with Matchers { """@log object TestClass2""" should compile """@log() object TestClass3""" should compile """@log(verbose=true) object TestClass4""" should compile - """@log(logType=io.github.dreamylost.logs.LogType.Slf4j) object TestClass5""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.Slf4j) object TestClass6""" should compile + """@log(logType=org.bitlap.tools.logs.LogType.Slf4j) object TestClass5""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.Slf4j) object TestClass6""" should compile } "log6 log4j2" should "ok on class" in { @@ -89,8 +89,8 @@ class LogTest extends AnyFlatSpec with Matchers { """@log class TestClass2(val i: Int = 0, var j: Int)""" should compile """@log() class TestClass3(val i: Int = 0, var j: Int)""" should compile """@log(verbose=true) class TestClass4(val i: Int = 0, var j: Int)""" should compile - """@log(logType=io.github.dreamylost.logs.LogType.Log4j2) class TestClass5(val i: Int = 0, var j: Int)""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.Log4j2) class TestClass6(val i: Int = 0, var j: Int)""" should compile + """@log(logType=org.bitlap.tools.logs.LogType.Log4j2) class TestClass5(val i: Int = 0, var j: Int)""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.Log4j2) class TestClass6(val i: Int = 0, var j: Int)""" should compile } "log7 slf4j" should "ok on class" in { @@ -101,10 +101,10 @@ class LogTest extends AnyFlatSpec with Matchers { """@toString @builder @log class TestClass2(val i: Int = 0, var j: Int)""" should compile //Use with multiple annotations """@log() class TestClass3(val i: Int = 0, var j: Int)""" should compile """@log(verbose=true) class TestClass4(val i: Int = 0, var j: Int)""" should compile - """@log(logType=io.github.dreamylost.logs.LogType.Slf4j) class TestClass5(val i: Int = 0, var j: Int)""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int)""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") }""" should compile - """@log(logType = io.github.dreamylost.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") }""" should compile //default verbose is false + """@log(logType=org.bitlap.tools.logs.LogType.Slf4j) class TestClass5(val i: Int = 0, var j: Int)""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int)""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") }""" should compile + """@log(logType = org.bitlap.tools.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") }""" should compile //default verbose is false } "log8 slf4j" should "ok on class and has object" in { @@ -115,13 +115,13 @@ class LogTest extends AnyFlatSpec with Matchers { """@toString @builder @log class TestClass2(val i: Int = 0, var j: Int)""" should compile //Use with multiple annotations """@log() class TestClass3(val i: Int = 0, var j: Int)""" should compile """@log(verbose=true) class TestClass4(val i: Int = 0, var j: Int)""" should compile - """@log(logType=io.github.dreamylost.logs.LogType.Slf4j) class TestClass5(val i: Int = 0, var j: Int)""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int)""" should compile - """@log(verbose=true, logType=io.github.dreamylost.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") }""" should compile - """@log(logType = io.github.dreamylost.logs.LogType.Slf4j) @builder class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") } - | @log(logType = io.github.dreamylost.logs.LogType.Slf4j) object TestClass6 { log.info("hello world");builder() }""".stripMargin should compile //default verbose is false + """@log(logType=org.bitlap.tools.logs.LogType.Slf4j) class TestClass5(val i: Int = 0, var j: Int)""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int)""" should compile + """@log(verbose=true, logType=org.bitlap.tools.logs.LogType.Slf4j) class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") }""" should compile + """@log(logType = org.bitlap.tools.logs.LogType.Slf4j) @builder class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") } + | @log(logType = org.bitlap.tools.logs.LogType.Slf4j) object TestClass6 { log.info("hello world");builder() }""".stripMargin should compile //default verbose is false - @log(logType = io.github.dreamylost.logs.LogType.Slf4j) + @log(logType = org.bitlap.tools.logs.LogType.Slf4j) @builder class TestClass8(val i: Int = 0, var j: Int) { log.info("hello world") } @@ -130,8 +130,8 @@ class LogTest extends AnyFlatSpec with Matchers { "log9 slf4j" should "ok on class and it object" in { """ - |@log(logType = io.github.dreamylost.logs.LogType.Slf4j) @builder class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") } - |@log(logType = io.github.dreamylost.logs.LogType.Slf4j) object TestClass6 { log.info("hello world"); builder()} + |@log(logType = org.bitlap.tools.logs.LogType.Slf4j) @builder class TestClass6(val i: Int = 0, var j: Int){ log.info("hello world") } + |@log(logType = org.bitlap.tools.logs.LogType.Slf4j) object TestClass6 { log.info("hello world"); builder()} |""".stripMargin should compile } @@ -141,7 +141,7 @@ class LogTest extends AnyFlatSpec with Matchers { | @builder case class TestClass6_2(val i: Int = 0, var j: Int) { | log.info("hello world") | } - | @log(logType = io.github.dreamylost.logs.LogType.Slf4j) object TestClass6_2 { + | @log(logType = org.bitlap.tools.logs.LogType.Slf4j) object TestClass6_2 { | log.info("hello world"); builder() | } |""".stripMargin shouldNot compile @@ -149,22 +149,22 @@ class LogTest extends AnyFlatSpec with Matchers { "log11 slf4j" should "ok on class and it object" in { """ - | @log(logType = io.github.dreamylost.logs.LogType.Slf4j) + | @log(logType = org.bitlap.tools.logs.LogType.Slf4j) | @builder class TestClass6(val i: Int = 0, var j: Int) { | log.info("hello world") | } - |@log(logType = io.github.dreamylost.logs.LogType.Slf4j) object TestClass6 { + |@log(logType = org.bitlap.tools.logs.LogType.Slf4j) object TestClass6 { | log.info("hello world"); builder() | } |""".stripMargin should compile """ | @builder - | @log(logType = io.github.dreamylost.logs.LogType.Slf4j) + | @log(logType = org.bitlap.tools.logs.LogType.Slf4j) | class TestClass6(val i: Int = 0, var j: Int) { | log.info("hello world") | } - |@log(logType = io.github.dreamylost.logs.LogType.Slf4j) object TestClass6 { + |@log(logType = org.bitlap.tools.logs.LogType.Slf4j) object TestClass6 { | log.info("hello world"); builder() | } |""".stripMargin should compile @@ -177,10 +177,10 @@ class LogTest extends AnyFlatSpec with Matchers { @log object TestLog1 { log.info("") } - @log(logType = io.github.dreamylost.logs.LogType.Slf4j) class TestLog2() { + @log(logType = org.bitlap.tools.logs.LogType.Slf4j) class TestLog2() { log.info("") } - import io.github.dreamylost.logs.LogType.JLog + import org.bitlap.tools.logs.LogType.JLog @log(logType = JLog) class TestLog3() { log.info("") } @@ -190,7 +190,7 @@ class LogTest extends AnyFlatSpec with Matchers { } "log12 slf4j" should "failed when input not in order" in { """ - | import io.github.dreamylost.logs.LogType + | import org.bitlap.tools.logs.LogType | @log(logType = LogType.Slf4j, verbose = true) | @builder class TestClass6(val i: Int = 0, var j: Int) { | log.info("hello world") @@ -200,20 +200,20 @@ class LogTest extends AnyFlatSpec with Matchers { "log13 scala loggging lazy" should "ok when does not exists super class" in { """ - | import io.github.dreamylost.logs.LogType + | import org.bitlap.tools.logs.LogType | @log(logType = LogType.ScalaLoggingLazy) | class TestClass1(val i: Int = 0, var j: Int) { | log.info("hello world") | } |""".stripMargin should compile - import io.github.dreamylost.logs.LogType + import org.bitlap.tools.logs.LogType @log(logType = LogType.ScalaLoggingLazy) class TestClass2(val i: Int = 0, var j: Int) { log.info("hello world") } """ - | import io.github.dreamylost.logs.LogType + | import org.bitlap.tools.logs.LogType | @log(logType = LogType.ScalaLoggingLazy) | class TestClass3(val i: Int = 0, var j: Int) { | log.info("hello world") @@ -221,7 +221,7 @@ class LogTest extends AnyFlatSpec with Matchers { |""".stripMargin should compile """ - | import io.github.dreamylost.logs.LogType + | import org.bitlap.tools.logs.LogType | @log(logType = LogType.ScalaLoggingLazy) | object TestClass4 { | log.info("hello world") @@ -231,20 +231,20 @@ class LogTest extends AnyFlatSpec with Matchers { "log14 scala loggging strict" should "ok when exists super class" in { """ - | import io.github.dreamylost.logs.LogType + | import org.bitlap.tools.logs.LogType | @log(logType = LogType.ScalaLoggingStrict) | class TestClass1(val i: Int = 0, var j: Int) extends Serializable { | log.info("hello world") | } |""".stripMargin should compile - import io.github.dreamylost.logs.LogType + import org.bitlap.tools.logs.LogType @log(logType = LogType.ScalaLoggingStrict) class TestClass2(val i: Int = 0, var j: Int) extends Serializable { log.info("hello world") } """ - | import io.github.dreamylost.logs.LogType + | import org.bitlap.tools.logs.LogType | @log(logType = LogType.ScalaLoggingStrict) | class TestClass3(val i: Int = 0, var j: Int) extends Serializable { | log.info("hello world") @@ -252,7 +252,7 @@ class LogTest extends AnyFlatSpec with Matchers { |""".stripMargin should compile """ - | import io.github.dreamylost.logs.LogType + | import org.bitlap.tools.logs.LogType | @log(logType = LogType.ScalaLoggingStrict) | object TestClass4 extends Serializable { | log.info("hello world") diff --git a/src/test/scala/io/github/dreamylost/NetService.scala b/src/test/scala/org/bitlap/tools/NetService.scala similarity index 94% rename from src/test/scala/io/github/dreamylost/NetService.scala rename to src/test/scala/org/bitlap/tools/NetService.scala index 96df58ca..fcf4c652 100644 --- a/src/test/scala/io/github/dreamylost/NetService.scala +++ b/src/test/scala/org/bitlap/tools/NetService.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools /** * diff --git a/src/test/scala/io/github/dreamylost/OthersTest.scala b/src/test/scala/org/bitlap/tools/OthersTest.scala similarity index 87% rename from src/test/scala/io/github/dreamylost/OthersTest.scala rename to src/test/scala/org/bitlap/tools/OthersTest.scala index 056c1b9f..b8fd48a3 100644 --- a/src/test/scala/io/github/dreamylost/OthersTest.scala +++ b/src/test/scala/org/bitlap/tools/OthersTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers @@ -32,7 +32,7 @@ import org.scalatest.matchers.should.Matchers */ class OthersTest extends AnyFlatSpec with Matchers { "others" should "ok" in { - assert(PACKAGE == "io.github.dreamylost") + assert(PACKAGE == "org.bitlap.tools") """ | @builder @@ -40,7 +40,7 @@ class OthersTest extends AnyFlatSpec with Matchers { |""".stripMargin shouldNot compile """ - | class Test extends _root_.io.github.dreamylost.logs.extension.ScalaStrictLogging { + | class Test extends _root_.org.bitlap.tools.logs.extension.ScalaStrictLogging { | log.info("hello") | } |""".stripMargin should compile diff --git a/src/test/scala/io/github/dreamylost/ProcessorCreatorTest.scala b/src/test/scala/org/bitlap/tools/ProcessorCreatorTest.scala similarity index 97% rename from src/test/scala/io/github/dreamylost/ProcessorCreatorTest.scala rename to src/test/scala/org/bitlap/tools/ProcessorCreatorTest.scala index 3eb9e2c0..3b437690 100644 --- a/src/test/scala/io/github/dreamylost/ProcessorCreatorTest.scala +++ b/src/test/scala/org/bitlap/tools/ProcessorCreatorTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,10 +19,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import com.alipay.sofa.jraft.rpc.{ RpcContext, RpcRequestClosure, RpcRequestProcessor } -import io.github.dreamylost.test.proto.BOpenSession.{ BOpenSessionReq, BOpenSessionResp } +import org.bitlap.tools.test.proto.BOpenSession.{ BOpenSessionReq, BOpenSessionResp } import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers diff --git a/src/test/scala/io/github/dreamylost/SynchronizedTest.scala b/src/test/scala/org/bitlap/tools/SynchronizedTest.scala similarity index 97% rename from src/test/scala/io/github/dreamylost/SynchronizedTest.scala rename to src/test/scala/org/bitlap/tools/SynchronizedTest.scala index ec08f9e1..76d77fa5 100644 --- a/src/test/scala/io/github/dreamylost/SynchronizedTest.scala +++ b/src/test/scala/org/bitlap/tools/SynchronizedTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers diff --git a/src/test/scala/io/github/dreamylost/ToStringTest.scala b/src/test/scala/org/bitlap/tools/ToStringTest.scala similarity index 97% rename from src/test/scala/io/github/dreamylost/ToStringTest.scala rename to src/test/scala/org/bitlap/tools/ToStringTest.scala index 43fd689a..2f0de6ff 100644 --- a/src/test/scala/io/github/dreamylost/ToStringTest.scala +++ b/src/test/scala/org/bitlap/tools/ToStringTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 jxnu-liguobin && contributors + * Copyright (c) 2021 org.bitlap * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package io.github.dreamylost +package org.bitlap.tools import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers @@ -285,12 +285,12 @@ class ToStringTest extends AnyFlatSpec with Matchers { val s5 = new TestClass5().toString println(s5) // Because not support if super class is a trait - assert(s5.startsWith("TestClass5(super=io.github.dreamylost.ToStringTes") && s5.endsWith("1)")) + assert(s5.startsWith("TestClass5(super=org.bitlap.tools.ToStringTes") && s5.endsWith("1)")) } "toString17" should "failed when input not in order" in { """ - | import io.github.dreamylost.logs.LogType + | import org.bitlap.tools.logs.LogType | @toString(includeFieldNames = false, callSuper = true, verbose = true) | class TestClass6(val i: Int = 0, var j: Int) |