forge/core — pull request #324 by VineetReynolds (2013-06-17 17:00:33+00:00)
Title: FORGE-917 Fixes to ensure that immutable classes are not scaffolded.

These changes are introduced outside MetaWidget since the context is not available to determine whether the inspected class is being scaffolded or not. Hence, the decision to avoid scaffolding the class is taken well before inspection.

I've taken the decision to omit scaffolding such classes even through they may appear in the search results, since they cannot be searched for, and neither can they be created or updated without using their non-0-arg constructors. Using them otherwise leads to PropertyNotWritableExceptions being thrown due to non-existent setters. Changing the class to add setters is out of question since that would change their immutable property.