Suggested Philosophy-Based Pattern

The implementation idea of the Inhibition Pattern is based on the Maximalism approach, which allows defining a potential association between a property and an object (which means that the association is established before the property becomes an actual one). potential property may, of course, be excluded from one of the potential property owner inheritors. We call this act of exclusion Inhibition.
In practice, the application is based on a class by the name of PropertyManager, which contains the following components:
  • The object property (e.g., the Fill class property that provides a description of the fill features for closed shapes).
  • Property status – Inhibited, Allowed.

The PropertyManager receives the property and its status as an input of its constructor, and it provides one Getter for the property and another one for its status.

The said class operates on the basis of the following principles:
  • Determining the status of the property is done only on a single occasion, which is when the object that owns the property is being instantiated.
  • The status of the property actually functions as an extension of class type, so for example, we could sort out objects that have a particular actual property (the property status is in the Allowed state) from a list of objects held by their base class.