Oracle GlassFish Server 3.0.1 Add-On Component Development Guide

Specifying Whether a Parameter Is Required or Optional

Whether a parameter is required or optional determines how a subcommand responds if a user omits the parameter when running the subcommand:

To specify whether a parameter is optional or required, set the optional element of the @Param annotation as follows: