<commit_before>/*
    Weave (Web-based Analysis and Visualization Environment)
    Copyright (C) 2008-2011 University of Massachusetts Lowell

    This file is a part of Weave.

    Weave is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License, Version 3,
    as published by the Free Software Foundation.

    Weave is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Weave.  If not, see <http://www.gnu.org/licenses/>.
*/

package weave.core
{
	/**
	 * This contains a session state object plus some metadata: objectName and className.
	 * 
	 * @author adufilie
	 */
	public class DynamicState
	{
		public function DynamicState(objectName:String = null, className:String = null, sessionState:Object = null)
		{
			this.objectName = objectName;
			this.className = className;
			this.sessionState = sessionState;
		}
		
		/**
		 * This is the name assigned to the object when the session state is generated.
		 */
		public var objectName:String = null;

		/**
		 * This is the qualified class name of the original object providing the session state.
		 */
		public var className:String = null;

		/**
		 * This is the session state for an object of the type specified by className.
		 */
		public var sessionState:Object = null;
		
		/**
		 * This function can be used to detect DynamicState objects within nested, untyped session state objects.
		 * If an object has only three properties (objectName, className, sessionState), this function will
		 * return a DynamicState object having those values.  Otherwise, null is returned because the object is
		 * assumed to be incompatible.
		 * @param object An object that has all the properties that DynamicState has.
		 * @param createNewObject If this is set to true, this function will return a new DynamicState object even if the given object is already a DynamicState.
		 * @return Either a DynamicState object or null if the cast failed.<commit_msg>now registering class alias for DynamicState<commit_after>/*
    Weave (Web-based Analysis and Visualization Environment)
    Copyright (C) 2008-2011 University of Massachusetts Lowell

    This file is a part of Weave.

    Weave is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License, Version 3,
    as published by the Free Software Foundation.

    Weave is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Weave.  If not, see <http://www.gnu.org/licenses/>.
*/

package weave.core
{
	import flash.net.registerClassAlias;
	import flash.utils.getQualifiedClassName;

	/**
	 * This contains a session state object plus some metadata: objectName and className.
	 * 
	 * @author adufilie
	 */
	public class DynamicState
	{
		{ /** begin static code block **/
			registerClassAlias(getQualifiedClassName(DynamicState), DynamicState);
		} /** end static code block **/
		
		public function DynamicState(objectName:String = null, className:String = null, sessionState:Object = null)
		{
			this.objectName = objectName;
			this.className = className;
			this.sessionState = sessionState;
		}
		
		/**
		 * This is the name assigned to the object when the session state is generated.
		 */
		public var objectName:String = null;

		/**
		 * This is the qualified class name of the original object providing the session state.
		 */
		public var className:String = null;

		/**
		 * This is the session state for an object of the type specified by className.
		 */
		public var sessionState:Object = null;
		
		/**
		 * This function can be used to detect DynamicState objects within nested, untyped session state objects.
		 * If an object has only three properties (objectName, className, sessionState), this function will
		 * return a DynamicState object having those values.  Otherwise, null is returned because the object is
		 * assumed to be incompatible.
		 * @param object An object that has all the properties that DynamicState has.
		 * @param createNewObject If this is set to true, this function will return a new DynamicState object even if the given object is already a DynamicState.
		 * @return Either a DynamicState object or null if the cast failed.
{'fraction_non_alphanumeric': 0.05934718100890208, 'fraction_numerical': 0.0038151759220008477, 'mean_word_length': 3.4476908576814327, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '118063', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1127, 'n_words': 594}