Object

org.opalj.bc

HelloWorldClass

Related Doc: package bc

Permalink

object HelloWorldClass extends App

Demonstrates how to create a "HelloWorld" class which basically has the following code:

public class Test {
 public static void main(String[] args) {
     System.out.println("Hello World");
 }
}
public class Test
minor version: 0
major version: 46
flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
#1 = Class              #2             // Test
#2 = Utf8               Test
#3 = Class              #4             // java/lang/Object
#4 = Utf8               java/lang/Object
#5 = Utf8               <init>
#6 = Utf8               ()V
#7 = Utf8               Code
#8 = Methodref          #3.#9          // java/lang/Object."":()V
#9 = NameAndType        #5:#6          // "":()V
#10 = Utf8               LineNumberTable
#11 = Utf8               LocalVariableTable
#12 = Utf8               this
#13 = Utf8               LTest;
#14 = Utf8               main
#15 = Utf8               ([Ljava/lang/String;)V
#16 = Fieldref           #17.#19        // java/lang/System.out:Ljava/io/PrintStream;
#17 = Class              #18            // java/lang/System
#18 = Utf8               java/lang/System
#19 = NameAndType        #20:#21        // out:Ljava/io/PrintStream;
#20 = Utf8               out
#21 = Utf8               Ljava/io/PrintStream;
#22 = String             #23            // Hello World
#23 = Utf8               Hello World
#24 = Methodref          #25.#27        // java/io/PrintStream.println:(Ljava/lang/String;)V
#25 = Class              #26            // java/io/PrintStream
#26 = Utf8               java/io/PrintStream
#27 = NameAndType        #28:#29        // println:(Ljava/lang/String;)V
#28 = Utf8               println
#29 = Utf8               (Ljava/lang/String;)V
#30 = Utf8               args
#31 = Utf8               [Ljava/lang/String;
#32 = Utf8               SourceFile
#33 = Utf8               Test.java
{
public Test();
descriptor: ()V
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: invokespecial #8                  // Method java/lang/Object."":()V
4: return

public static void main(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
0: getstatic     #16                 // Field java/lang/System.out:Ljava/io/PrintStream;
3: ldc           #22                 // String Hello World
5: invokevirtual #24                 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
8: return
SourceFile: "Test.java"
Source
HelloWorldClass.scala
Linear Supertypes
App, DelayedInit, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HelloWorldClass
  2. App
  3. DelayedInit
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def args: Array[String]

    Permalink
    Attributes
    protected
    Definition Classes
    App
    Annotations
    @deprecatedOverriding( "args should not be overridden" , "2.11.0" )
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. val cf: ClassFile

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. val executionStart: Long

    Permalink
    Definition Classes
    App
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def main(args: Array[String]): Unit

    Permalink
    Definition Classes
    App
    Annotations
    @deprecatedOverriding( "main should not be overridden" , "2.11.0" )
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def delayedInit(body: ⇒ Unit): Unit

    Permalink
    Definition Classes
    App → DelayedInit
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.0) The delayedInit mechanism will disappear.

Inherited from App

Inherited from DelayedInit

Inherited from AnyRef

Inherited from Any

Ungrouped