}
private boolean initialize(sun.tools.java.Type type, ContextStack stack) {
int typeCode = TYPE_NONE;
Identifier id = null;
String idlName = null;
String[] idlModuleName = null;
boolean constant = stack.size() > 0 && stack.getContext().isConstant();
if (type.isType(TC_CLASS)) {
id = type.getClassName();
if (id.equals(idRemote)) {
typeCode = TYPE_JAVA_RMI_REMOTE;
idlName = IDL_JAVA_RMI_REMOTE;
idlModuleName = IDL_JAVA_RMI_MODULE;
} else if (id == idJavaIoSerializable) {
typeCode = TYPE_ANY;
idlName = IDL_SERIALIZABLE;
idlModuleName = IDL_JAVA_IO_MODULE;
} else if (id == idJavaIoExternalizable) {
typeCode = TYPE_ANY;
idlName = IDL_EXTERNALIZABLE;
idlModuleName = IDL_JAVA_IO_MODULE;
} else if (id == idIDLEntity) {
typeCode = TYPE_ANY;
idlName = IDL_IDLENTITY;
idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE;
} else {
typeCode = TYPE_CORBA_OBJECT;
// Is it exactly org.omg.CORBA.Object?
if (id == idCorbaObject) {
// Yes, so special case...
idlName = IDLNames.getTypeName(typeCode,constant);
idlModuleName = null;
} else {
// No, so get the correct names...
try {
// These can fail if we get case-sensitive name matches...
idlName = IDLNames.getClassOrInterfaceName(id,env);
idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env);
} catch (Exception e) {
failedConstraint(7,false,stack,id.toString(),e.getMessage());
throw new CompilerError("");
}
}
}
}