@NotNull public static ModuleType getModuleType(@NotNull ErlangFile file) { ModuleType type = ModuleType.REGULAR; for (ErlangBehaviour behaviour : file.getBehaviours()) { type = ModuleType.getType(behaviour.getName()); if (type != ModuleType.REGULAR) break; } return type; }
@NotNull public static ModuleType getType(@NotNull String behaviourName) { for (ModuleType type : ModuleType.values()) if (StringUtil.equals(type.behaviourName, behaviourName)) return type; return REGULAR; }