Record Class GuiceElementModuleRecord
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.spi.guice.record.GuiceElementModuleRecord
- Record Components:
moduleType
- the type ofModule
to import.
public record GuiceElementModuleRecord(Class<? extends com.google.inject.Module> moduleType)
extends Record
A record type for
GuiceElementModule
.-
Constructor Summary
ConstructorsConstructorDescriptionGuiceElementModuleRecord
(Class<? extends com.google.inject.Module> moduleType) Creates an instance of aGuiceElementModuleRecord
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static GuiceElementModuleRecord
from
(GuiceElementModule guiceElementModule) Creates aGuiceElementModuleRecord
from the suppliedGuiceElementModule
annotation.static Stream
<GuiceElementModuleRecord> fromPackage
(Package aPackage) final int
hashCode()
Returns a hash code value for this object.Class
<? extends com.google.inject.Module> Returns the value of themoduleType
record component.com.google.inject.Module
Creates an instance of theModule
type.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
GuiceElementModuleRecord
Creates an instance of aGuiceElementModuleRecord
record class.- Parameters:
moduleType
- the value for themoduleType
record component
-
-
Method Details
-
newModule
public com.google.inject.Module newModule()Creates an instance of theModule
type.- Returns:
- the new
Module
instance
-
fromPackage
- Parameters:
aPackage
- thePackage
with theGuiceElementModule
annotation- Returns:
- a
Stream
of records
-
from
Creates aGuiceElementModuleRecord
from the suppliedGuiceElementModule
annotation.- Parameters:
guiceElementModule
- theGuiceElementModule
annotation- Returns:
- the
GuiceElementModuleRecord
-
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)
. -
moduleType
Returns the value of themoduleType
record component.- Returns:
- the value of the
moduleType
record component
-