I'm using C# but the problem could also be with Java. I have an object in the flow that is muted for setting up some properties during the flow of the program. Let say
public class Person {
public string name {get; set;}
public string surname {get; set;}
}
public class Citizen {
public string name {get; set;}
public string surname {get; set;}
public string country {get; set;}
....
}
actually the flow is to create Citizen with just name and surname and enriched the fields with methods..ect but the problem is that after some methods and some steps, we doesn't know which field is initialized or not. Maybe we would use two objet like create Person and recreate a more specialized object Citizen with the fields we want to enrich and do a copy of each Person fields in Citizen. But we can have performance issues, can we do that without creating many new objects at each steps of the program ?