ExternalSystemSourceType (boolean isTest, boolean isGenerated, boolean isResource, boolean isExcluded) { for (ExternalSystemSourceType systemSourceType : ExternalSystemSourceType.values()) { if (systemSourceType.isGenerated == isGenerated && systemSourceType.isResource == isResource && systemSourceType.isTest == isTest && systemSourceType.isExcluded == isExcluded) { return systemSourceType; } } return null; }