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

Method uriToClasspath

basex-core/src/main/java/org/basex/util/Strings.java:343–347  ·  view source on GitHub ↗

Converts the given string to a Java class name. Slashes will be replaced with dots, and the last package segment will be capitalized and camel-cased. @param string string to convert @return class name

(final String string)

Source from the content-addressed store, hash-verified

341 * @return class name
342 */
343 public static String uriToClasspath(final String string) {
344 final String s = string.replace('/', '.');
345 final int c = s.lastIndexOf('.') + 1;
346 return s.substring(0, c) + capitalize(camelCase(s.substring(c)));
347 }
348
349 /**
350 * Converts a URI to a directory path.

Callers 6

classNameMethod · 0.95
getMethod · 0.95
deleteMethod · 0.95
packagesMethod · 0.95
writeMethod · 0.95
addImportMethod · 0.95

Calls 5

capitalizeMethod · 0.95
camelCaseMethod · 0.95
lastIndexOfMethod · 0.80
replaceMethod · 0.45
substringMethod · 0.45

Tested by 1

classNameMethod · 0.76