Skip to content

Bio Enum Annotations

Rajab Davudov edited this page Mar 13, 2019 · 2 revisions

@BioEnumObj

This annotation is used to define which class holds enum definitions. As following:

@BioEnumObj
public class EngineType extends BioEnum {
    public EngineType(int ordinal, String name) {
        super(ordinal, name);
    }
	
    public final static EngineType VEE = new EngineType(0, "vee");
    public final static EngineType INLINE = new EngineType(1, "inline");
    public final static EngineType ROTARY = new EngineType(2, "rotary");
}

Also it contains several optional properties.

  • code() codes are auto-generated if not provided. code is used in serialization to indicate which Bio Enum is serialized.
  • type() types are auto-generated as class name. type is used to define composition enum tag type.
  • dictionary() is used to define dictionary id.

Dictionary will automatically search for public final static class fields of enum type and add them to the dictionary.

Clone this wiki locally