Record Class GuiceElementModuleRecord

java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.spi.guice.record.GuiceElementModuleRecord
Record Components:
moduleType - the type of Module to import.

public record GuiceElementModuleRecord(Class<? extends com.google.inject.Module> moduleType) extends Record
A record type for GuiceElementModule.
  • Constructor Details

    • GuiceElementModuleRecord

      public GuiceElementModuleRecord(Class<? extends com.google.inject.Module> moduleType)
      Creates an instance of a GuiceElementModuleRecord record class.
      Parameters:
      moduleType - the value for the moduleType record component
  • Method Details

    • newModule

      public com.google.inject.Module newModule()
      Creates an instance of the Module type.
      Returns:
      the new Module instance
    • fromPackage

      public static Stream<GuiceElementModuleRecord> fromPackage(Package aPackage)
      Creates a Stream of GuiceElementModuleRecords from the supplied Package
      Parameters:
      aPackage - the Package with the GuiceElementModule annotation
      Returns:
      a Stream of records
    • from

      public static GuiceElementModuleRecord from(GuiceElementModule guiceElementModule)
      Creates a GuiceElementModuleRecord from the supplied GuiceElementModule annotation.
      Parameters:
      guiceElementModule - the GuiceElementModule annotation
      Returns:
      the GuiceElementModuleRecord
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • moduleType

      public Class<? extends com.google.inject.Module> moduleType()
      Returns the value of the moduleType record component.
      Returns:
      the value of the moduleType record component