Record Class GuiceElementModuleRecord
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.spi.guice.record.GuiceElementModuleRecord
- Record Components:
moduleType- the type ofModuleto 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 aGuiceElementModuleRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static GuiceElementModuleRecordfrom(GuiceElementModule guiceElementModule) Creates aGuiceElementModuleRecordfrom the suppliedGuiceElementModuleannotation.static Stream<GuiceElementModuleRecord> fromPackage(Package aPackage) final inthashCode()Returns a hash code value for this object.Class<? extends com.google.inject.Module> Returns the value of themoduleTyperecord component.com.google.inject.ModuleCreates an instance of theModuletype.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GuiceElementModuleRecord
Creates an instance of aGuiceElementModuleRecordrecord class.- Parameters:
moduleType- the value for themoduleTyperecord component
-
-
Method Details
-
newModule
public com.google.inject.Module newModule()Creates an instance of theModuletype.- Returns:
- the new
Moduleinstance
-
fromPackage
- Parameters:
aPackage- thePackagewith theGuiceElementModuleannotation- Returns:
- a
Streamof records
-
from
Creates aGuiceElementModuleRecordfrom the suppliedGuiceElementModuleannotation.- Parameters:
guiceElementModule- theGuiceElementModuleannotation- 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 themoduleTyperecord component.- Returns:
- the value of the
moduleTyperecord component
-