Class ModelViewClosedException

  • All Implemented Interfaces:
    java.io.Serializable

    @Incubating
    public class ModelViewClosedException
    extends ReadOnlyModelViewException
    Thrown when at attempt is made to mutate a subject of a rule after the rule has completed.

    This can potentially happen when a reference to the subject is retained during a rule and then used afterwards, Such as when an anonymous inner class or closure “closes over” the subject.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelViewClosedException​(org.gradle.model.internal.core.ModelPath path, org.gradle.model.internal.type.ModelType<?> type, org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor ruleDescriptor)  
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ModelViewClosedException

        public ModelViewClosedException​(org.gradle.model.internal.core.ModelPath path,
                                        org.gradle.model.internal.type.ModelType<?> type,
                                        org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor ruleDescriptor)