Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 988 Bytes

FAQ.md

File metadata and controls

23 lines (15 loc) · 988 Bytes

Halva FAQ


Overriding annotation defaults

Any Halva annotation attribute default value can be overriden by passing arguments to the Java compiler. The form of the override is -A_AnnotationName_._AttributeName_=defaultValue. For example, to change the default CaseClass suffix from "Case" to "Impl", use -ACaseClass.suffix=Impl.

CaseClasses in other CaseClasses

The Halva Annotation Processor will replace references to class templates with the name of the generated classes during processing. This allows you, for example, to have CaseClasses refer to other CaseClasses. E.g.

@CaseClass public interface Name{String name()}
@CaseClass public interface Client{Name name()}

In the above the "name" field in Client will be of type NameCase in the generated ClientCase class