void freeze() {}
+ /* Note: this method is overridden by CtClassType
+ */
void checkModify() throws RuntimeException {
if (isFrozen())
throw new RuntimeException(getName() + " class is frozen");
void freeze() { wasFrozen = true; }
void checkModify() throws RuntimeException {
- super.checkModify();
+ if (isFrozen()) {
+ String msg = getName() + " class is frozen";
+ if (wasPruned)
+ msg += " and pruned";
+
+ throw new RuntimeException(msg);
+ }
+
wasChanged = true;
}
}
}
+ /* See also checkModified()
+ */
private void checkPruned(String method) {
if (wasPruned)
throw new RuntimeException(method + "(): " + getName()