Created
          March 17, 2011 07:25 
        
      - 
      
- 
        Save yuroyoro/873972 to your computer and use it in GitHub Desktop. 
    scalaのlazy valってこんな風に初期化されるんですぜ(2.9)
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. | |
| // Jad home page: http://www.kpdus.com/jad.html | |
| // Decompiler options: packimports(3) | |
| // Source File Name: Main.scala | |
| import scala.Predef$; | |
| import scala.ScalaObject; | |
| import scala.collection.immutable.StringLike; | |
| import scala.runtime.BoxedUnit; | |
| import scala.util.Random$; | |
| public final class Main$ | |
| implements ScalaObject | |
| { | |
| public String what() | |
| { | |
| if((bitmap$0 & 1) == 0) | |
| synchronized(this) | |
| { | |
| if((bitmap$0 & 1) == 0) | |
| { | |
| what = Predef$.MODULE$.augmentString("(((((((( \uFF1B\uFF9F\u0414\uFF9F))))))))\uFF76\uFF9E\uFF78\uFF76\uFF9E\uFF78\uFF8C\uFF9E\uFF99\uFF8C\uFF9E\uFF99\uFF76\uFF9E\uFF80\uFF76\uFF9E\uFF80\uFF8C\uFF9E\uFF99\uFF8C\uFF9E\uFF99 ").$times(Random$.MODULE$.nextInt(4)); | |
| bitmap$0 = bitmap$0 | 1; | |
| } | |
| BoxedUnit _tmp = BoxedUnit.UNIT; | |
| } | |
| return what; | |
| } | |
| public void main(String args[]) | |
| { | |
| Predef$.MODULE$.println(what()); | |
| } | |
| private Main$() | |
| { | |
| } | |
| public static final Main$ MODULE$ = this; | |
| private String what; | |
| public volatile int bitmap$0; | |
| static | |
| { | |
| new Main$(); | |
| } | |
| } | 
  
    
      This file contains hidden or 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 Main{ | |
| lazy val what = "(((((((( ;゚Д゚))))))))ガクガクブルブルガタガタブルブル "* util.Random.nextInt(4) | |
| def main(args:Array[String]) = { | |
| println( what ) | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment