/** * Creates a {@link SnuggleSnapshot} Object holding the current state of this session that can * be later used to recreate a session having exactly the same state. */ public SnuggleSnapshot createSnapshot() { return new SnuggleSnapshot(engine, packages, (SessionConfiguration) configuration.clone(), (DOMOutputOptions) defaultDOMOutputOptions.clone(), /* (No real need to clone as this is immutable here, but we'll do it for consistency) */ (XMLStringOutputOptions) defaultXMLStringOutputOptions.clone(), /* (Ditto) */ new ArrayList<InputError>(errors), new HashMap<String, UserDefinedCommand>(userCommandMap), new HashMap<String, UserDefinedEnvironment>(userEnvironmentMap), new ArrayList<FlowToken>(parsedTokens)); }
this.defaultXMLStringOutputOptions = (XMLStringOutputOptions) engine.getDefaultXMLStringOutputOptions().clone();