.class public PrintThread

.super java/lang/Thread

.field private protected sleepTime I
.field private protected f Ljoos/lib/JoosIO;
.field private protected r I

.method public <init>()V
  .limit locals 1
  .limit stack 5
  aload_0
  aconst_null
  checkcast java/lang/Thread
  invokenonvirtual java/lang/Thread/<init>(Ljava/lang/Runnable;)V
  new joos/lib/JoosIO
  dup
  invokenonvirtual joos/lib/JoosIO/<init>()V
  aload_0
  swap
  putfield PrintThread/f Ljoos/lib/JoosIO;
  new java/util/Random
  dup
  invokenonvirtual java/util/Random/<init>()V
  invokevirtual java/util/Random/nextInt()I
  aload_0
  swap
  putfield PrintThread/r I
  aload_0
  getfield PrintThread/r I
  iconst_0
  if_icmple else_0
  aload_0
  getfield PrintThread/r I
  ldc 5000
  irem
  aload_0
  swap
  putfield PrintThread/sleepTime I
  goto stop_1
  else_0:
  aload_0
  getfield PrintThread/r I
  ineg
  ldc 5000
  irem
  aload_0
  swap
  putfield PrintThread/sleepTime I
  stop_1:
  aload_0
  getfield PrintThread/f Ljoos/lib/JoosIO;
  ldc "System Thread Name: "
  aload_0
  invokevirtual java/lang/Thread/getName()Ljava/lang/String;
  dup
  ifnonnull stop_13
  pop
  ldc "null"
  stop_13:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnonnull stop_9
  pop
  ldc "null"
  stop_9:
  ldc ";  sleep: "
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnonnull stop_7
  pop
  ldc "null"
  stop_7:
  new java/lang/Integer
  dup
  aload_0
  getfield PrintThread/sleepTime I
  invokenonvirtual java/lang/Integer/<init>(I)V
  invokevirtual java/lang/Integer/toString()Ljava/lang/String;
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnonnull stop_5
  pop
  ldc "null"
  stop_5:
  ldc " created."
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  return
.end method

.method public run()V
  .limit locals 1
  .limit stack 4
  new joos/lib/JoosThread
  dup
  aconst_null
  invokenonvirtual joos/lib/JoosThread/<init>(Ljava/lang/Thread;)V
  aload_0
  getfield PrintThread/sleepTime I
  invokevirtual joos/lib/JoosThread/sleep(I)Z
  ifeq stop_0
  aload_0
  getfield PrintThread/f Ljoos/lib/JoosIO;
  ldc "Interruption of thread "
  aload_0
  invokevirtual java/lang/Thread/getName()Ljava/lang/String;
  dup
  ifnonnull stop_4
  pop
  ldc "null"
  stop_4:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  stop_0:
  aload_0
  getfield PrintThread/f Ljoos/lib/JoosIO;
  ldc "Thread "
  aload_0
  invokevirtual java/lang/Thread/getName()Ljava/lang/String;
  dup
  ifnonnull stop_10
  pop
  ldc "null"
  stop_10:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnonnull stop_6
  pop
  ldc "null"
  stop_6:
  ldc " ran."
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  return
.end method

