class ModuleLocation
extends java.lang.Object
Module module = clazz.getModule(); if (module != null) { Configuration configuration = module.getLayer().configuration(); OptionalIn Jetty 10, this entire class can be moved to direct calls to java.lang.Module in TypeUtil.getModuleLocation()resolvedModule = configuration.findModule(module.getName()); if (resolvedModule.isPresent()) { ModuleReference moduleReference = resolvedModule.get().reference(); Optional location = moduleReference.location(); if (location.isPresent()) { return location.get(); } } } return null;
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<?> |
classModule |
private java.lang.invoke.MethodHandle |
handleConfiguration |
private java.lang.invoke.MethodHandle |
handleGetLayer |
private java.lang.invoke.MethodHandle |
handleGetModule |
private java.lang.invoke.MethodHandle |
handleGetName |
private java.lang.invoke.MethodHandle |
handleLocation |
private java.lang.invoke.MethodHandle |
handleOptionalResolvedModule |
private java.lang.invoke.MethodHandle |
handleReference |
private static Logger |
LOG |
Constructor and Description |
---|
ModuleLocation() |
Modifier and Type | Method and Description |
---|---|
java.net.URI |
getModuleLocation(java.lang.Class<?> clazz) |
private static final Logger LOG
private final java.lang.Class<?> classModule
private final java.lang.invoke.MethodHandle handleGetModule
private final java.lang.invoke.MethodHandle handleGetLayer
private final java.lang.invoke.MethodHandle handleConfiguration
private final java.lang.invoke.MethodHandle handleGetName
private final java.lang.invoke.MethodHandle handleOptionalResolvedModule
private final java.lang.invoke.MethodHandle handleReference
private final java.lang.invoke.MethodHandle handleLocation