public List arguments()

in atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageArgumentsImpl.java [113:181]


    public List<String> arguments()
    {
        final List<String> arguments = new ArrayList<>();
        final List<String> otherArguments = new ArrayList<>();
        //-cp
        arguments.add(NI_PARAM_CP);
        String cp = classPathFiles().stream()//
            .filter(Objects::nonNull)//
            .map(Path::toAbsolutePath)//
            .sorted(NativeImageArgumentsImpl::byAbsolutePath)//
            .map(Path::toString)//
            .collect(Collectors.joining(NativeImageCliUtil.isWindows() ? ";" : ":"));
        arguments.add(cp);

        //--verbose
        addArgIfTrue(otherArguments, NI_PARAM_VERBOSE, verbose);
        //initialize-at-build-time
        addArgIfExits(otherArguments, NI_PARAM_INITIALIZE_AT_BUILD_TIME,
            initializeAtBuildTime());
        //H:ReflectionConfigurationFiles
        addArgIfExitsPath(otherArguments, NI_PARAM_H_REFLECTION_CONFIGURATION_FILES,
            reflectionConfigurationFiles());
        //H:ResourceConfigurationFiles
        addArgIfExitsPath(otherArguments, NI_PARAM_H_RESOURCE_CONFIGURATION_FILES,
            resourceConfigurationFiles());
        //H:DynamicProxyConfigurationFiles
        addArgIfExitsPath(otherArguments, NI_PARAM_H_DYNAMIC_PROXY_CONFIGURATION_FILES,
            dynamicProxyConfigurationFiles());
        //--allow-incomplete-classpath
        addArgIfTrue(otherArguments, NI_PARAM_ALLOW_INCOMPLETE_CLASSPATH,
            allowIncompleteClasspath());
        //-H:+ReportUnsupportedElementsAtRuntime
        addArgIfTrue(otherArguments, NI_PARAM_H_REPORT_UNSUPPORTED_ELEMENTS_AT_RUNTIME,
            reportUnsupportedElementsAtRuntime());
        //-H:+ReportExceptionStackTraces
        addArgIfTrue(otherArguments, NI_PARAM_H_REPORT_EXCEPTION_STACK_TRACES,
            reportExceptionStackTraces());
        //
        addArgIfTrue(otherArguments, NI_PARAM_H_PRINT_CLASS_INITIALIZATION,
            traceClassInitialization());
        //--no-fallback
        addArgIfTrue(otherArguments, NI_PARAM_NO_FALLBACK, noFallback());
        //--debug-attach
        addArgIfTrue(otherArguments, NI_PARAM_DEBUG_ATTACH, debugAttach());
        //-H:+PrintClassInitialization
        addArgIfTrue(otherArguments, NI_PARAM_PRINT_CLASS_INITIALIZATION,
            printClassInitialization());

        //-H:Class
        otherArguments.add(combineArg(NI_PARAM_H_CLASS, mainClass()));
        //-H:Name"
        otherArguments.add(combineArg(NI_PARAM_H_NAME, name()));
        //-D<name>=<value> sets a system property for the JVM running the image generator
        vmSystemProperties().forEach((k, v) -> {
            otherArguments.add(combineArg("-D" + k, v));
        });
        vmFlags().forEach(flag -> {
            otherArguments.add("-J" + flag);
        });
        final List<String> additionalArguments = additionalArguments();
        if (additionalArguments != null && !additionalArguments.isEmpty())
        {
            otherArguments.addAll(additionalArguments());
        }

        otherArguments.sort((o1, o2) -> o1.compareTo(o2));
        arguments.addAll(otherArguments);
        return arguments;
    }