Hi Vineet,

You could use the flagOnly attribute in the Option annotation:
https://github.com/forge/core/blob/master/shell/src/main/java/org/jboss/forge/shell/plugins/builtin/LsPlugin.java#L83

If optional == true, then the optional flag is not written, since it's the default value in these annotations 

http://docs.oracle.com/javaee/6/api/javax/persistence/ManyToOne.html#optional()
http://docs.oracle.com/javaee/6/api/javax/persistence/OneToOne.html#optional()