MCPcopy Create free account
hub / github.com/apache/freemarker / getNamespace

Method getNamespace

src/main/java/freemarker/core/Environment.java:1230–1237  ·  view source on GitHub ↗

Returns the name-space for the name if exists, or null. @param name the template path that you have used with the import directive or #importLib(String, String) call, in normalized form. That is, the path must be an absolute path, and it must not contain "/../" or "/./".

(String name)

Source from the content-addressed store, hash-verified

1228 * path, and it must not contain "/../" or "/./". The leading "/" is optional.
1229 */
1230 public Namespace getNamespace(String name) {
1231 if (name.startsWith("/")) name = name.substring(1);
1232 if (loadedLibs != null) {
1233 return (Namespace) loadedLibs.get(name);
1234 } else {
1235 return null;
1236 }
1237 }
1238
1239 /**
1240 * Returns the main name-space.

Callers

nothing calls this directly

Calls 2

substringMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected