public EnumTypedef addTypedef ( Group g , EnumTypedef td ) { if ( ! defineMode ) throw new UnsupportedOperationException ( "not in define mode" ) ; if ( ! version . isExtendedModel ( ) ) throw new IllegalArgumentException ( "Enum type only supported in extended model, this version is=" + version ) ; g . addEnumeration ( td ) ; return td ; }
Add a EnumTypedef to the file . Must be in define mode .