summaryrefslogtreecommitdiff
path: root/core/src/main/scala/forge/discover/Router.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/scala/forge/discover/Router.scala')
-rw-r--r--core/src/main/scala/forge/discover/Router.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/src/main/scala/forge/discover/Router.scala b/core/src/main/scala/forge/discover/Router.scala
index 2c92d847..1034b46e 100644
--- a/core/src/main/scala/forge/discover/Router.scala
+++ b/core/src/main/scala/forge/discover/Router.scala
@@ -16,7 +16,6 @@ import scala.language.experimental.macros
*/
object Router{
class doc(s: String) extends StaticAnnotation
- class main extends StaticAnnotation
def generateRoutes[T]: Seq[Router.EntryPoint[T]] = macro generateRoutesImpl[T]
def generateRoutesImpl[T: c.WeakTypeTag](c: Context): c.Expr[Seq[EntryPoint[T]]] = {
import c.universe._
@@ -385,7 +384,7 @@ class Router [C <: Context](val c: C) {
def getAllRoutesForClass(curCls: Type): Iterable[c.universe.Tree] = {
for{
t <- getValsOrMeths(curCls)
- if t.annotations.exists(_.tpe =:= typeOf[Router.main])
+ if t.returnType <:< typeOf[forge.define.Command[_]]
} yield {
extractMethod(t, curCls)
}