protected Reference getEffectiveTypeReference() {
return type != null ? type : getEnumParentType();
}
public Reference getEnumParentType() {
EnumBody enumBody = getParent_Concrete();
ASTNode parentEnum = enumBody.getParent();
if(parentEnum instanceof DeclarationEnum) {
DeclarationEnum declarationEnum = (DeclarationEnum) parentEnum;
return declarationEnum.type;
}
if(parentEnum instanceof DefinitionEnum) {