public static IEnumerable <string> PropertyImportsForInterface(PropertyJvaf property, string package) { foreach (string import in property.Imports) { if (import.StartsWith(package) && !import.Contains(".implementation.")) { continue; } yield return(import); } // string modelTypeName = property.ModelTypeName; if (property.ModelType is SequenceTypeJva) { var modelType = property.ModelType; while (modelType is SequenceTypeJva) { SequenceTypeJva sequenceType = (SequenceTypeJva)modelType; modelType = sequenceType.ElementType; } modelTypeName = modelType.ClassName; } // if (modelTypeName.EndsWith("Inner")) { yield return($"{package}.implementation.{modelTypeName}"); } }
public static HashSet <string> PropertyImports(PropertyJvaf property, string innerModelPackage) { HashSet <string> imports = new HashSet <string>(); var propertyImports = property.Imports; // var propertyImports = property.Imports.Where(import => !import.EqualsIgnoreCase(thisPackage)); // string modelTypeName = property.ModelTypeName; if (property.ModelType is SequenceTypeJva) { var modelType = property.ModelType; while (modelType is SequenceTypeJva) { SequenceTypeJva sequenceType = (SequenceTypeJva)modelType; modelType = sequenceType.ElementType; } modelTypeName = modelType.ClassName; } if (modelTypeName.EndsWith("Inner")) { imports.Add($"{innerModelPackage}.{modelTypeName}"); } imports.AddRange(propertyImports); return(imports); }
public static IEnumerable <string> PropertyImportsForImpl(PropertyJvaf property, string package) { foreach (string import in property.Imports) { if (import.StartsWith(package) && import.Contains(".implementation.")) { continue; } yield return(import); } }