Skip to content

Instantly share code, notes, and snippets.

@Leward
Created September 19, 2016 21:05
Show Gist options
  • Save Leward/5b8caa2d5e3b22be25871b19d65cf7a6 to your computer and use it in GitHub Desktop.
Save Leward/5b8caa2d5e3b22be25871b19d65cf7a6 to your computer and use it in GitHub Desktop.
Groovy @builder with trait
trait MissionDefinition {
UUID id = UUID.randomUUID()
String label
String description
Integer teamSize
LocalDate startDate
LocalDate endDate
ActivityType activityType
String salesForceId
}
@Immutable
@Builder(builderStrategy = BuilderASTTransformation.BuilderStrategy)
class MissionView implements MissionDefinition {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment