Record Class ResolvedModuleHolder
java.lang.Object
java.lang.Record
mods.thecomputerizer.theimpossiblelibrary.neoforge.core.modules.ResolvedModuleHolder
public record ResolvedModuleHolder(mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ResolvedModuleAccess module, ModuleClassLoaderAccess loader)
extends Record
Simple holder class for a ResolvedModule and the ModuleClassLoader it was found in
-
Constructor Summary
ConstructorsConstructorDescriptionResolvedModuleHolder(mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ResolvedModuleAccess module, ModuleClassLoaderAccess loader) Assumes the input ModuleClassLoaderAccess has its layerName field set -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ResolvedModuleHolderfindModule(String moduleName, ModuleClassLoaderAccess loader) static ResolvedModuleHolderfindModule(String moduleName, ModuleClassLoaderAccess... loaders) static ResolvedModuleHolderfindPackage(String pkg, cpw.mods.modlauncher.api.IModuleLayerManager.Layer... layers) static ResolvedModuleHolderfindPackage(String pkg, ModuleClassLoaderAccess loader) static ResolvedModuleHolderfindPackage(String pkg, ModuleClassLoaderAccess... loaders) cpw.mods.modlauncher.api.IModuleLayerManager.LayergetLayer()final inthashCode()Returns a hash code value for this object.loader()Returns the value of theloaderrecord component.mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ResolvedModuleAccessmodule()Returns the value of themodulerecord component.otherPackageRef(String pkg) Get a resolved module in the current loader.voidfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResolvedModuleHolder
public ResolvedModuleHolder(mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ResolvedModuleAccess module, ModuleClassLoaderAccess loader) Assumes the input ModuleClassLoaderAccess has its layerName field set
-
-
Method Details
-
findModule
public static ResolvedModuleHolder findModule(String moduleName, ModuleClassLoaderAccess... loaders) -
findModule
-
findPackage
-
findPackage
public static ResolvedModuleHolder findPackage(String pkg, cpw.mods.modlauncher.api.IModuleLayerManager.Layer... layers) -
findPackage
-
getLayer
public cpw.mods.modlauncher.api.IModuleLayerManager.Layer getLayer() -
getPackages
-
layerName
-
moduleName
-
otherPackageRef
Get a resolved module in the current loader. Returns null if it isn't found or this if the package is in the same module. -
removePackagesFromLoader
public void removePackagesFromLoader() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
module
public mods.thecomputerizer.theimpossiblelibrary.api.core.modules.ResolvedModuleAccess module()Returns the value of themodulerecord component.- Returns:
- the value of the
modulerecord component
-
loader
Returns the value of theloaderrecord component.- Returns:
- the value of the
loaderrecord component
-