Class ModelMethod<S,T>

java.lang.Object
ch.raffael.meldioc.model.ModelMethod<S,T>

public abstract class ModelMethod<S,T> extends Object
Rich representation of a method participating in the Meld model.
  • Method Details

    • builder

      public static <S, T> ModelMethod.Builder<S,T> builder()
    • of

      public static <S, T> ModelMethod<S,T> of(SrcElement<S,T> element, ModelType<S,T> modelType)
    • element

      @Parameter public abstract SrcElement<S,T> element()
    • modelType

      @Parameter public abstract ModelType<S,T> modelType()
    • returnType

      @Lazy public T returnType()
    • exceptions

      @Lazy public io.vavr.collection.Seq<T> exceptions()
    • overrides

      public abstract io.vavr.collection.Seq<ModelMethod<S,T>> overrides()
    • via

      public abstract io.vavr.control.Option<ModelMethod<S,T>> via()
    • withVia

      public ModelMethod<S,T> withVia(ModelMethod<S,T> via)
    • implied

      public boolean implied()
    • implyReason

      @Default public ModelMethod.ImplyReason implyReason()
    • arguments

      @Auxiliary public abstract io.vavr.collection.Seq<io.vavr.control.Either<ModelMethod<S,T>,BuiltinArgument>> arguments()
    • messages

      @Auxiliary public abstract io.vavr.collection.Seq<Message<S,T>> messages()
    • withMessages

      public abstract ModelMethod<S,T> withMessages(io.vavr.collection.Seq<Message<S,T>> value)
    • withElement

      ModelMethod<S,T> withElement(SrcElement<S,T> value)
      Copy the current immutable object by setting a value for the element attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for element
      Returns:
      A modified copy of the this object
    • withModelType

      ModelMethod<S,T> withModelType(ModelType<S,T> value)
      Copy the current immutable object by setting a value for the modelType attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for modelType
      Returns:
      A modified copy of the this object
    • withOverrides

      ModelMethod<S,T> withOverrides(io.vavr.collection.Seq<ModelMethod<S,T>> value)
      Copy the current immutable object by setting a value for the overrides attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for overrides
      Returns:
      A modified copy of the this object
    • withVia

      ModelMethod<S,T> withVia(io.vavr.control.Option<ModelMethod<S,T>> value)
      Copy the current immutable object by setting a value for the via attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for via
      Returns:
      A modified copy of the this object
    • withImplyReason

      ModelMethod<S,T> withImplyReason(ModelMethod.ImplyReason value)
      Copy the current immutable object by setting a value for the implyReason attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for implyReason
      Returns:
      A modified copy of the this object
    • withArguments

      ModelMethod<S,T> withArguments(io.vavr.collection.Seq<io.vavr.control.Either<ModelMethod<S,T>,BuiltinArgument>> value)
      Copy the current immutable object by setting a value for the arguments attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for arguments
      Returns:
      A modified copy of the this object