MCPcopy Create free account
hub / github.com/BaseXdb/basex / options

Method options

basex-core/src/main/java/org/basex/util/options/Options.java:718–727  ·  view source on GitHub ↗

Returns all options from the specified class. @param clz options class @return option instances @throws IllegalAccessException exception

(final Class<? extends Options> clz)

Source from the content-addressed store, hash-verified

716 * @throws IllegalAccessException exception
717 */
718 private static Option<?>[] options(final Class<? extends Options> clz)
719 throws IllegalAccessException {
720
721 final ArrayList<Option<?>> options = new ArrayList<>();
722 for(final Field f : clz.getFields()) {
723 if(!Modifier.isStatic(f.getModifiers())) continue;
724 if(f.get(null) instanceof final Option opt) options.add(opt);
725 }
726 return options.toArray(Option[]::new);
727 }
728
729 /**
730 * Reads the configuration file and initializes the options.

Callers 3

OptionsMethod · 0.95
writeMethod · 0.95
readMethod · 0.95

Calls 4

isStaticMethod · 0.80
getMethod · 0.65
addMethod · 0.65
toArrayMethod · 0.45

Tested by

no test coverage detected