From 7e96f539872dc28d040b24b9aa81f7cf08f8cbf3 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Sat, 1 Apr 2017 13:40:29 -0400 Subject: hopefully more self-explanatory name --- libraries/reflect/reflect.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libraries') diff --git a/libraries/reflect/reflect.scala b/libraries/reflect/reflect.scala index bd7c245..c2b05ed 100644 --- a/libraries/reflect/reflect.scala +++ b/libraries/reflect/reflect.scala @@ -65,7 +65,7 @@ package ops { } trait Module { def getMain( cls: Class[_] ): StaticMethod[Seq[String], ExitCode] = { - val f = findStaticExitMethodForced[Array[String]]( cls, "main" ) + val f = findStaticExitMethodOrFail[Array[String]]( cls, "main" ) f.copy( function = ( args: Seq[String] ) => f.function( args.to ) ) @@ -113,16 +113,16 @@ trait Module { .replace( File.separator, "." ) } - def findStaticExitMethodForced[Arg: ClassTag]( + def findStaticExitMethodOrFail[Arg: ClassTag]( cls: Class[_], name: String ): StaticMethod[Arg, ExitCode] = { - val f = findStaticMethodForced[Arg, Unit]( cls, name ) + val f = findStaticMethodOrFail[Arg, Unit]( cls, name ) f.copy( function = arg => trapExitCode { f.function( arg ); ExitCode.Success } ) } - def findStaticMethodForced[Arg, Result]( + def findStaticMethodOrFail[Arg, Result]( cls: Class[_], name: String )( implicit -- cgit v1.2.3