63
63
import com .oracle .svm .core .option .HostedOptionKey ;
64
64
import com .oracle .svm .core .option .HostedOptionValues ;
65
65
import com .oracle .svm .core .option .LocatableMultiOptionValue ;
66
- import com .oracle .svm .core .option .OptionUtils ;
67
66
import com .oracle .svm .core .option .RuntimeOptionKey ;
68
67
import com .oracle .svm .core .thread .VMOperationControl ;
69
68
import com .oracle .svm .core .util .UserError ;
@@ -91,7 +90,7 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Boolean o
91
90
@ Option (help = "Preserve the local variable information for every Java source line to allow line-by-line stepping in the debugger. Allow the lookup of Java-level method information, e.g., in stack traces." )//
92
91
public static final HostedOptionKey <Boolean > SourceLevelDebug = new HostedOptionKey <>(false );
93
92
@ Option (help = "Constrain debug info generation to the comma-separated list of package prefixes given to this option." )//
94
- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > SourceLevelDebugFilter = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
93
+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > SourceLevelDebugFilter = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
95
94
96
95
public static boolean parseOnce () {
97
96
/*
@@ -186,9 +185,8 @@ private static Predicate<String> makeFilter(List<String> definedFilters) {
186
185
if (definedFilters .isEmpty ()) {
187
186
return javaName -> true ;
188
187
}
189
- List <String > wildCardList = OptionUtils .flatten ("," , definedFilters );
190
188
return javaName -> {
191
- for (String wildCard : wildCardList ) {
189
+ for (String wildCard : definedFilters ) {
192
190
if (javaName .startsWith (wildCard )) {
193
191
return true ;
194
192
}
@@ -282,10 +280,10 @@ public static void setDebugInfoValueUpdateHandler(ValueUpdateHandler<Integer> up
282
280
public static final HostedOptionKey <Boolean > IncludeNodeSourcePositions = new HostedOptionKey <>(false );
283
281
284
282
@ Option (help = "Search path for C libraries passed to the linker (list of comma-separated directories)" )//
285
- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > CLibraryPath = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
283
+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > CLibraryPath = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
286
284
287
285
@ Option (help = "Path passed to the linker as the -rpath (list of comma-separated directories)" )//
288
- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > LinkerRPath = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
286
+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > LinkerRPath = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
289
287
290
288
@ Option (help = "Directory of the image file to be generated" , type = OptionType .User )//
291
289
public static final HostedOptionKey <String > Path = new HostedOptionKey <>(null );
@@ -375,11 +373,11 @@ public Boolean getValue(OptionValues values) {
375
373
376
374
@ APIOption (name = "trace-class-initialization" )//
377
375
@ Option (help = "Comma-separated list of fully-qualified class names that class initialization is traced for." )//
378
- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > TraceClassInitialization = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
376
+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > TraceClassInitialization = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
379
377
380
378
@ APIOption (name = "trace-object-instantiation" )//
381
379
@ Option (help = "Comma-separated list of fully-qualified class names that object instantiation is traced for." )//
382
- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > TraceObjectInstantiation = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
380
+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > TraceObjectInstantiation = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
383
381
384
382
@ Option (help = "Trace all native tool invocations as part of image building" , type = User )//
385
383
public static final HostedOptionKey <Boolean > TraceNativeToolUsage = new HostedOptionKey <>(false );
@@ -394,10 +392,10 @@ public Boolean getValue(OptionValues values) {
394
392
@ APIOption (name = "enable-https" , fixedValue = "https" , customHelp = "enable https support in the generated image" )//
395
393
@ APIOption (name = "enable-url-protocols" )//
396
394
@ Option (help = "List of comma separated URL protocols to enable." )//
397
- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > EnableURLProtocols = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
395
+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > EnableURLProtocols = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
398
396
399
397
@ Option (help = "List of comma separated URL protocols that must never be included." )//
400
- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > DisableURLProtocols = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
398
+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > DisableURLProtocols = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
401
399
402
400
@ SuppressWarnings ("unused" ) //
403
401
@ APIOption (name = "enable-all-security-services" )//
@@ -659,7 +657,7 @@ public static void defaultDebugInfoValueUpdateHandler(EconomicMap<OptionKey<?>,
659
657
}
660
658
661
659
@ Option (help = "Search path for source files for Application or GraalVM classes (list of comma-separated directories or jar files)" )//
662
- public static final HostedOptionKey <LocatableMultiOptionValue .Strings > DebugInfoSourceSearchPath = new HostedOptionKey <>(new LocatableMultiOptionValue .Strings ());
660
+ public static final HostedOptionKey <LocatableMultiOptionValue .Strings > DebugInfoSourceSearchPath = new HostedOptionKey <>(LocatableMultiOptionValue .Strings . commaSeparated ());
663
661
664
662
@ Option (help = "Directory under which to create source file cache for Application or GraalVM classes" )//
665
663
public static final HostedOptionKey <String > DebugInfoSourceCacheRoot = new HostedOptionKey <>("sources" );
0 commit comments