private static int ObjectCount = 0;
private final static int MaxObjectCount = 1;
public Object() {
if (Object.ObjectCount >= Object.MaxObjectCount) {
throw new ExtensionError(this.getExtensionName(),
String.format("Can't create core extension objects with count more than %s.",
Object.MaxObjectCount));
} else {
Object.ObjectCount++;
}