All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nuggets.delegate.DCharArray Maven / Gradle / Ivy

The newest version!
/*
 * DcharArray.java
 * Copyright (c) 2005 by University of Hamburg. All Rights Reserved.
 * Departament of Informatics. 
 * Distributed Systems and Information Systems.
 *
 * Created by walczak on Jan 18, 2006.  
 * Last revision $Revision: 4064 $ by:
 * $Author: walczak $ on $Date: 2006-02-23 18:48:47 +0100 (Do, 23 Feb 2006) $.
 */
package nuggets.delegate;

import nuggets.IAssembler;
import nuggets.ICruncher;

/** DcharArray 
 * @author walczak
 * @since  Jan 18, 2006
 */
public class DCharArray extends ADelegate
{
	/** 
	 * @param o
	 * @param mill
	 * @see nuggets.delegate.ADelegate#persist(java.lang.Object, nuggets.ICruncher)
	 */
	public void persist(Object o, ICruncher mill, ClassLoader classloader)
	{
		  mill.startConcept(o);
        mill.put("type", "[C");

        char[] chars =(char[])o;
        mill.setText(chars, 0, chars.length);
	}

	/** 
	 * @param clazz
	 * @param asm
	 * @return a new instance of this array
	 * @throws Exception
	 */
	public Object getInstance(Class clazz,IAssembler asm) throws Exception
	{
		return asm.getText().toCharArray();
	}	
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy