The `@synchronized` is a more convenient and flexible synchronous annotation.
- Note
-`lockedName` The name of the custom lock obj, default is `this`.
-`lockedName` The name of the custom lock obj, default is `this`.
- Support static and instance methods.
- Example
...
...
@@ -178,8 +178,7 @@ The `@log` does not use mixed or wrapper, but directly uses macro to generate de
-`io.github.dreamylost.LogType.JLog` use `java.util.logging.Logger`
-`io.github.dreamylost.LogType.Log4j2` use `org.apache.logging.log4j.Logger`
-`io.github.dreamylost.LogType.Slf4j` use `org.slf4j.Logger`
- Support `class`, `case class` and `object`.
- Support `class`, `case class` and `object`.
> IDE support is not very good, a red prompt will appear, but the compilation is OK. You need to provide their dependencies and configuration, please refer to the test.
...
...
@@ -212,6 +211,34 @@ The `@apply` used to generate `apply` method for primary construction of ordinar
println(B2(1,2))
```
## @constructor
The `@constructor` used to generate secondary constructor method for classes.
- Note
-`verbose` Whether to enable detailed log.
-`excludeFields` Whether to exclude the specified `var` fields, default is `Nil`.
- Only support `class`.
- Currying is not supported for constructors at present.
- When used with `@toString`, it must be put last. Known problems.
> IDE support is not very good, a red prompt will appear, but the compilation is OK. You need to provide their dependencies and configuration, please refer to the test.