< prev index next >
src/jdk.jextract/share/classes/com/sun/tools/jextract/Main.java
Print this page
@@ -131,10 +131,11 @@
parser.acceptsAll(List.of("o", "jar"), format("help.o")).withRequiredArg();
parser.acceptsAll(List.of("t", "target-package"), format("help.t")).withRequiredArg();
parser.acceptsAll(List.of("m", "package-map"), format("help.m")).withRequiredArg();
parser.acceptsAll(List.of("?", "h", "help"), format("help.h")).forHelp();
parser.accepts("C", format("help.C")).withRequiredArg();
+ parser.accepts("include-symbols", format("help.include_symbols")).withRequiredArg();
parser.accepts("log", format("help.log")).withRequiredArg();
parser.accepts("exclude-symbols", format("help.exclude_symbols")).withRequiredArg();
parser.accepts("rpath", format("help.rpath")).withRequiredArg();
parser.accepts("infer-rpath", format("help.infer.rpath"));
parser.accepts("static-forwarder", format("help.static.forwarder")).
@@ -212,10 +213,18 @@
if (options.has("static-forwarder")) {
staticForwarder = (boolean)options.valueOf("static-forwarder");
}
ctx.setGenStaticForwarder(staticForwarder && options.has("l"));
+ if (options.has("include-symbols")) {
+ try {
+ options.valuesOf("include-symbols").forEach(sym -> ctx.addIncludeSymbols((String) sym));
+ } catch (PatternSyntaxException pse) {
+ ctx.err.println(format("include.symbols.pattern.error", pse.getMessage()));
+ }
+ }
+
if (options.has("exclude-symbols")) {
try {
options.valuesOf("exclude-symbols").forEach(sym -> ctx.addExcludeSymbols((String) sym));
} catch (PatternSyntaxException pse) {
ctx.err.println(format("exclude.symbols.pattern.error", pse.getMessage()));
< prev index next >