Class ModelType<S,​T>


  • public final class ModelType<S,​T>
    extends java.lang.Object
    A rich representation of a Meld model type.

    This class also does all the analysis and validations and reports errors to the model's MessageSink. If there are validation errors, it tries to keep the model as consistent as possible, errors are only reported but won't cause building the model type to fail.

    Consequently, its contents may cause a code generator to generate BS. It's up to the code generator to watch the message sink for errors. A generator will usually not generate any code if there are model errors.

    OTOH, this way, we can collect as many errors as possible in one analysis run.

    • Constructor Detail

      • ModelType

        public ModelType​(Model<S,​T> model,
                         T type)
    • Method Detail

      • model

        public Model<S,​T> model()
      • type

        public T type()
      • element

        public ch.raffael.meldioc.model.CElement<S,​T> element()
      • superTypes

        public io.vavr.collection.Seq<ModelType<S,​T>> superTypes()
      • isImported

        public boolean isImported​(ModelType<S,​T> type)
      • allMethods

        public io.vavr.collection.Seq<ch.raffael.meldioc.model.ModelMethod<S,​T>> allMethods()
      • provisionMethods

        public io.vavr.collection.Seq<ch.raffael.meldioc.model.ModelMethod<S,​T>> provisionMethods()
      • extensionPointMethods

        public io.vavr.collection.Seq<ch.raffael.meldioc.model.ModelMethod<S,​T>> extensionPointMethods()
      • allProvisionMethods

        public io.vavr.collection.Seq<ch.raffael.meldioc.model.ModelMethod<S,​T>> allProvisionMethods()
      • mountMethods

        public io.vavr.collection.Seq<ch.raffael.meldioc.model.ModelMethod<S,​T>> mountMethods()
      • setupMethods

        public io.vavr.collection.Seq<ch.raffael.meldioc.model.ModelMethod<S,​T>> setupMethods()
      • parameterMethods

        public io.vavr.collection.Seq<ch.raffael.meldioc.model.ModelMethod<S,​T>> parameterMethods()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object