-
Notifications
You must be signed in to change notification settings - Fork 43
/
AppInfo.scala
25 lines (21 loc) · 856 Bytes
/
AppInfo.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package caseapp
case class AppName(appName: String) extends annotation.StaticAnnotation {
private[caseapp] def orElse(other: AppName): AppName = AppName(
if (appName.nonEmpty) appName else other.appName
)
}
case class ProgName(progName: String) extends annotation.StaticAnnotation {
private[caseapp] def orElse(other: ProgName): ProgName = ProgName(
if (progName.nonEmpty) progName else other.progName
)
}
case class AppVersion(appVersion: String) extends annotation.StaticAnnotation {
private[caseapp] def orElse(other: AppVersion): AppVersion = AppVersion(
if (appVersion.nonEmpty) appVersion else other.appVersion
)
}
case class ArgsName(argsName: String) extends annotation.StaticAnnotation {
private[caseapp] def orElse(other: ArgsName): ArgsName = ArgsName(
if (argsName.nonEmpty) argsName else other.argsName
)
}