Last active
October 5, 2017 06:22
-
-
Save Madusudanan/0510dfc3e18750443d34c4fed839a681 to your computer and use it in GitHub Desktop.
Scala pattern matching decompiled - 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Source code recreated from a .class file by IntelliJ IDEA | |
// (powered by Fernflower decompiler) | |
// | |
import RunExample.delayedInit.body; | |
import scala.App; | |
import scala.Function0; | |
import scala.Predef.; | |
import scala.collection.mutable.ListBuffer; | |
import scala.runtime.BoxedUnit; | |
public final class RunExample$ implements App { | |
public static RunExample$ MODULE$; | |
private final int status; | |
private final long executionStart; | |
private String[] scala$App$$_args; | |
private final ListBuffer<Function0<BoxedUnit>> scala$App$$initCode; | |
static { | |
new RunExample$(); | |
} | |
public String[] args() { | |
return App.args$(this); | |
} | |
/** @deprecated */ | |
public void delayedInit(Function0<BoxedUnit> body) { | |
App.delayedInit$(this, body); | |
} | |
public void main(String[] args) { | |
App.main$(this, args); | |
} | |
public long executionStart() { | |
return this.executionStart; | |
} | |
public String[] scala$App$$_args() { | |
return this.scala$App$$_args; | |
} | |
public void scala$App$$_args_$eq(String[] x$1) { | |
this.scala$App$$_args = x$1; | |
} | |
public ListBuffer<Function0<BoxedUnit>> scala$App$$initCode() { | |
return this.scala$App$$initCode; | |
} | |
public void scala$App$_setter_$executionStart_$eq(long x$1) { | |
this.executionStart = x$1; | |
} | |
public final void scala$App$_setter_$scala$App$$initCode_$eq(ListBuffer<Function0<BoxedUnit>> x$1) { | |
this.scala$App$$initCode = x$1; | |
} | |
public int status() { | |
return this.status; | |
} | |
public final void delayedEndpoint$RunExample$1() { | |
this.status = 0; | |
int var1 = this.status(); | |
switch(var1) { | |
case 0: | |
.MODULE$.println("The status is false"); | |
break; | |
case 1: | |
.MODULE$.println("The status is true"); | |
break; | |
default: | |
.MODULE$.println("Unknown status"); | |
} | |
} | |
private RunExample$() { | |
MODULE$ = this; | |
App.$init$(this); | |
this.delayedInit(new body(this)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object RunExample extends App { | |
val status = 0 | |
status match { | |
case 0 => println("The status is false") | |
case 1 => println("The status is true") | |
case _ => println("Unknown status") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment