Package dev.gmitch215.bytebox.gradle
Record Class WorkflowClasses
java.lang.Object
java.lang.Record
dev.gmitch215.bytebox.gradle.WorkflowClasses
- Record Components:
className- the fully qualified Java class namesingleton- whether it is reached through a staticINSTANCE, as a Kotlin object is
- All Implemented Interfaces:
Serializable
public record WorkflowClasses(String className, boolean singleton)
extends Record
implements Serializable
A Workflow class written in Java.
Read the way DurableObjects reads a Durable Object: the class is loaded without being
initialised, so no user code runs, and it has to implement the interface the generated export
calls.
- Since:
- 1.0.3
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowClasses(String className, boolean singleton) Creates an instance of aWorkflowClassesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the binding name, which isWORKFLOW_and the class name upper-snaked.Returns the value of theclassNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the prefix the generated export carries.final inthashCode()Returns a hash code value for this object.static List<WorkflowClasses> Reads each named class.Returns the class's simple name, which is what the JavaScript class is called.booleanReturns the value of thesingletonrecord component.final StringtoString()Returns a string representation of this record class.Returns the Workflow's name, the class name in kebab case, which Cloudflare keeps unique per account.
-
Constructor Details
-
Method Details
-
simpleName
Returns the class's simple name, which is what the JavaScript class is called.- Returns:
- the class's simple name, which is what the JavaScript class is called
-
bindingName
Returns the binding name, which isWORKFLOW_and the class name upper-snaked.Derived from the same name the plugin compares against the bindings a project declared, so a project that declares its own binding for the class is not given a second one.
- Returns:
- the binding name, which is
WORKFLOW_and the class name upper-snaked
-
workflowName
Returns the Workflow's name, the class name in kebab case, which Cloudflare keeps unique per account.- Returns:
- the Workflow's name, the class name in kebab case, which Cloudflare keeps unique per account
-
exportPrefix
Returns the prefix the generated export carries.- Returns:
- the prefix the generated export carries
-
of
Reads each named class.- Parameters:
classNames- the fully qualified class namesclasspath- where to find them and the interface they implement- Returns:
- one entry per class, in the order named
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
className
Returns the value of theclassNamerecord component.- Returns:
- the value of the
classNamerecord component
-
singleton
public boolean singleton()Returns the value of thesingletonrecord component.- Returns:
- the value of the
singletonrecord component
-