getFlag<T> method
Returns a NatrixFlag casted as the Type if the flag is available by it's identifier.
All NatrixFlags defined in the
superior CLI-tree (at least all superior if inheritFlags = true)
are available here at all times.
Throw
Implementation
NatrixFlag<T> getFlag<T>(String name) {
for (final NatrixFlag f in flags) {
if (f.id == name) {
return f as NatrixFlag<T>;
}
}
throw FlagNotFoundException(
identifier: name,
superiorCommandIdentifier: this.cmd.id,
);
}