Record Class ScheduledAtMethod
java.lang.Object
java.lang.Record
com.thewinterframework.service.meta.scheduler.ScheduledAtMethod
- All Implemented Interfaces:
SchedulerMethod
public record ScheduledAtMethod(Class<?> service, AnnotatedMethodHandle<?> method, List<ScheduledAtMethod.ScheduledAtTime> schedules)
extends Record
implements SchedulerMethod
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionScheduledAtMethod(Class<?> service, AnnotatedMethodHandle<?> method, List<ScheduledAtMethod.ScheduledAtTime> schedules) Creates an instance of aScheduledAtMethodrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.method()Returns the value of themethodrecord component.intschedule(WinterPlugin plugin) Schedules this method to be executed by the plugin.Returns the value of theschedulesrecord component.Class<?> service()Returns the value of theservicerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScheduledAtMethod
public ScheduledAtMethod(Class<?> service, AnnotatedMethodHandle<?> method, List<ScheduledAtMethod.ScheduledAtTime> schedules) Creates an instance of aScheduledAtMethodrecord class.- Parameters:
service- the value for theservicerecord componentmethod- the value for themethodrecord componentschedules- the value for theschedulesrecord component
-
-
Method Details
-
schedule
Description copied from interface:SchedulerMethodSchedules this method to be executed by the plugin.- Specified by:
schedulein interfaceSchedulerMethod- Parameters:
plugin- Plugin to schedule this method for- Returns:
- The created schedule
-
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). -
service
Returns the value of theservicerecord component.- Returns:
- the value of the
servicerecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
schedules
Returns the value of theschedulesrecord component.- Returns:
- the value of the
schedulesrecord component
-