@Override
    public @NonNull Collection<@NonNull FlagDescriptor> extractFlags(final @NonNull Method method) {
        final Collection<FlagDescriptor> flags = new LinkedList<>();
        for (final Parameter parameter : method.getParameters()) {
            if (!parameter.isAnnotationPresent(Flag.class)) {
                continue;
            }
            final Flag flag = parameter.getAnnotation(Flag.class);
            final String flagName = this.annotationParser.processString(flag.value());

            final String name;
            if (flagName.equals(AnnotationParser.INFERRED_ARGUMENT_NAME)) {
                name = parameter.getName();
            } else {
                name = flagName;
            }

            final FlagDescriptor flagDescriptor = FlagDescriptor.builder()
                    .parameter(parameter)
                    .name(name)
                    .description(this.descriptionMapper.map(flag.description()))
                    .aliases(this.annotationParser.processStrings(Arrays.asList(flag.aliases())))
                    .permission(Permission.of(this.annotationParser.processString(flag.permission())))
                    .repeatable(flag.repeatable())
                    .parserName(nullIfEmpty(this.annotationParser.processString(flag.parserName())))
                    .suggestions(nullIfEmpty(this.annotationParser.processString(flag.suggestions())))
                    .build();
            flags.add(flagDescriptor);
        }
        return flags;
    }
Creates a new flag extractor.

@param annotationParser annotation parser
cloud-annotations/src/main/java/org/incendo/cloud/annotations/extractor/FlagExtractorImpl.java