{"id":63633,"library":"derive4j-annotation","title":"Derive4J Annotation","description":"Derive4J Annotation provides annotations and API for deriving algebraic data types, constructors, morphisms, optics, and typeclasses in Java.","status":"active","version":"1.1.1","language":"java","source_language":null,"source_url":"https://github.com/derive4j/derive4j","tags":["functional-programming","annotation-processor","adt","java"],"install":[{"cmd":"<dependency>\n  <groupId>org.derive4j</groupId>\n  <artifactId>derive4j-annotation</artifactId>\n  <version>1.1.1</version>\n</dependency>","lang":"xml","label":"Maven"},{"cmd":"implementation 'org.derive4j:derive4j-annotation:1.1.1'","lang":"groovy","label":"Gradle"}],"dependencies":[],"imports":[{"symbol":"Data","correct":"org.derive4j.Data"}],"quickstart":{"code":"import org.derive4j.Data;\nimport org.derive4j.Flavour;\n\n@Data\npublic interface Tree<A> {\n    <X> X match(Cases<A, X> cases);\n    interface Cases<A, X> {\n        X leaf(A value);\n        X node(Tree<A> left, Tree<A> right);\n    }\n}","lang":"java","description":"Define an algebraic data type using @Data annotation."},"warnings":[{"fix":"Add maven-compiler-plugin with annotation processor paths or use IDE annotation processing.","message":"Requires annotation processing to be enabled in the build (e.g., Maven compiler plugin).","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'adt':27 'algebra':11 'annot':2,4,6,25 'annotation-processor':24 'api':8 'constructor':14 'data':12 'deriv':10 'derive4j':1,3 'function':22 'functional-program':21 'java':20,28 'morphism':15 'optic':16 'processor':26 'program':23 'provid':5 'type':13 'typeclass':18","created_at":"2026-06-17T16:46:09.623979+00:00","updated_at":"2026-06-17T16:46:09.623979+00:00","problems":[],"ecosystem":"maven","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/derive4j/derive4j","github":"https://github.com/derive4j/derive4j","docs":"https://appdoc.app/artifact/org.derive4j/derive4j-annotation/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}