* InputStream
*/
public void readExternal( ObjectInput stream ) throws IOException,
ClassNotFoundException {
boolean isDroolsStream = stream instanceof DroolsObjectInputStream;
DroolsObjectInputStream in = isDroolsStream ? (DroolsObjectInputStream) stream
: new DroolsObjectInputStream(
new ByteArrayInputStream(
(byte[]) stream.readObject() ) );
// setting parent classloader for dialect datas
this.dialectRuntimeRegistry = (DialectRuntimeRegistry) in.readObject();
this.typeDeclarations = (LinkedHashMap) in.readObject();
this.name = (String) in.readObject();
this.imports = (Map<String, ImportDeclaration>) in.readObject();
this.staticImports = (Set) in.readObject();
this.functions = (Map<String, Function>) in.readObject();
this.accumulateFunctions = (Map<String, AccumulateFunction>) in.readObject();
this.factTemplates = (Map) in.readObject();
this.ruleFlows = (Map) in.readObject();
this.globals = (Map<String, String>) in.readObject();
this.valid = in.readBoolean();
this.needStreamMode = in.readBoolean();
this.rules = (Map<String, RuleImpl>) in.readObject();
this.classFieldAccessorStore = (ClassFieldAccessorStore) in.readObject();
this.entryPointsIds = (Set<String>) in.readObject();
this.windowDeclarations = (Map<String, WindowDeclaration>) in.readObject();
this.traitRegistry = (TraitRegistry) in.readObject();
if (!isDroolsStream) {
in.close();
}
}