Class AbstractNamedImmutableModel

java.lang.Object
org.mule.runtime.extension.api.model.AbstractImmutableModel
org.mule.runtime.extension.api.model.AbstractNamedImmutableModel
All Implemented Interfaces:
org.mule.runtime.api.meta.DescribedObject, org.mule.runtime.api.meta.model.display.HasDisplayModel, org.mule.runtime.api.meta.model.EnrichableModel, org.mule.runtime.api.meta.NamedObject
Direct Known Subclasses:
AbstractComplexModel, AbstractParameterizedModel, ImmutableParameterGroupModel, ImmutableParameterModel

public abstract class AbstractNamedImmutableModel extends AbstractImmutableModel implements org.mule.runtime.api.meta.NamedObject, org.mule.runtime.api.meta.model.display.HasDisplayModel
Base class for immutable implementations of NamedObject introspection models
Since:
1.0
  • Constructor Details

    • AbstractNamedImmutableModel

      protected AbstractNamedImmutableModel(String name, String description, org.mule.runtime.api.meta.model.display.DisplayModel displayModel, Set<org.mule.runtime.api.meta.model.ModelProperty> modelProperties)
      Creates a new instance
      Parameters:
      name - the model's name
      description - the model's description
      displayModel - a model containing directives about how this component is to be displayed in the UI
      modelProperties - A Set of custom properties which extend this model
      Throws:
      IllegalArgumentException - if name is blank
  • Method Details

    • checkArgument

      protected static void checkArgument(boolean condition, String message)
    • getName

      public final String getName()
      Specified by:
      getName in interface org.mule.runtime.api.meta.NamedObject
    • getDisplayModel

      public Optional<org.mule.runtime.api.meta.model.display.DisplayModel> getDisplayModel()
      Specified by:
      getDisplayModel in interface org.mule.runtime.api.meta.model.display.HasDisplayModel
    • equals

      public boolean equals(Object obj)
      Defines object equality based on the given object being an object of this class and in the equality of the getName() attributes
      Overrides:
      equals in class Object
      Parameters:
      obj - an object
      Returns:
      true if equal
    • hashCode

      public int hashCode()
      Calculates hashcode based on getName()
      Overrides:
      hashCode in class Object
      Returns:
      a hash code
    • toString

      public String toString()
      Overrides:
      toString in class AbstractImmutableModel