java.module.annotation
Annotation Type MainClass


@Target(value={SUPERPACKAGE,TYPE})
@Retention(value=RUNTIME)
public @interface MainClass

Indicates the main class of a module definition. The main class name must not have the .class extension appended. This metadata annotation is applied to the development module, i.e. the superpackage construct.

For example,

    @MainClass("com.wombat.xyz.Main")
    superpackage com.wombat.xyz {
        ...
    }
 

Note that being a main class does not imply the class is exported from the module definition. The main class must be declared as exported separately. For example,

    @MainClass("com.wombat.xyz.Main")
    superpackage com.wombat.xyz {
       export com.wombat.xyz.*;
       ...
    }
 

Since:
1.7.0
Author:
Stanley M. Ho

Required Element Summary
 String value
          Main class name.
 

Element Detail

value

public abstract String value
Main class name.