Package org.eclipse.jetty.util
Class ModuleLocation
- java.lang.Object
-
- org.eclipse.jetty.util.ModuleLocation
-
class ModuleLocation extends java.lang.Object
Equivalent of ...Module module = clazz.getModule(); if (module != null) { Configuration configuration = module.getLayer().configuration(); Optional
In 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;
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description ModuleLocation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.URI
getModuleLocation(java.lang.Class<?> clazz)
-
-
-
Field Detail
-
LOG
private static final Logger LOG
-
classModule
private final java.lang.Class<?> classModule
-
handleGetModule
private final java.lang.invoke.MethodHandle handleGetModule
-
handleGetLayer
private final java.lang.invoke.MethodHandle handleGetLayer
-
handleConfiguration
private final java.lang.invoke.MethodHandle handleConfiguration
-
handleGetName
private final java.lang.invoke.MethodHandle handleGetName
-
handleOptionalResolvedModule
private final java.lang.invoke.MethodHandle handleOptionalResolvedModule
-
handleReference
private final java.lang.invoke.MethodHandle handleReference
-
handleLocation
private final java.lang.invoke.MethodHandle handleLocation
-
-