/**
* Initialize this instance.
*/
private boolean initialize (ContextStack stack, boolean quiet) {
ClassDefinition ourDef = getClassDefinition();
ClassDeclaration ourDecl = getClassDeclaration();
try {
// Make sure our parentage is ok...
if (!initParents(stack)) {
failedConstraint(12,quiet,stack,getQualifiedName());
return false;
}
// We're ok, so make up our collections...
Vector directInterfaces = new Vector();
Vector directMethods = new Vector();
Vector directMembers = new Vector();
// Get interfaces...
if (addNonRemoteInterfaces(directInterfaces,stack) != null) {
// Get methods...
if (addAllMethods(ourDef,directMethods,false,false,stack) != null) {
// Update parent class methods
if (updateParentClassMethods(ourDef,directMethods,false,stack) != null) {
// Get constants and members...
if (addAllMembers(directMembers,false,false,stack)) {
// We're ok, so pass 'em up...
if (!initialize(directInterfaces,directMethods,directMembers,stack,quiet)) {
return false;
}
// Is this class Externalizable?
boolean externalizable = false;
if (!env.defExternalizable.implementedBy(env, ourDecl)) {
// No, so check to see if we have a serialPersistentField
// that will modify the members.
if (!checkPersistentFields(getClassInstance(),quiet)) {
return false;
}
} else {
// Yes.
externalizable = true;
}
// Should this class be considered "custom"? It is if
// it is Externalizable OR if it has a method with the
// following signature:
//
// private void writeObject(java.io.ObjectOutputStream out);
//
if (externalizable) {
isCustom = true;
} else {
for (MemberDefinition member = ourDef.getFirstMember();
member != null;
member = member.getNextMember()) {
if (member.isMethod() &&
!member.isInitializer() &&