// Path: src/main/java/org/spearal/SpearalContext.java
// public interface SpearalContext {
// 
// 	void configure(Configurable configurable);
// 	void configure(Configurable configurable, boolean append);
// 	
// 	Securizer getSecurizer();
// 	
// 	String alias(Class<?> cls);
// 	String unalias(String aliasedClassName);
// 	
// 	Class<?> loadClass(String classNames, Type target)
// 		throws SecurityException;
// 	Object newInstance(Class<?> cls);
// 	
// 	Property[] getProperties(Class<?> cls);
// 	
// 	Object instantiate(Type type, Object param)
// 		throws InstantiationException, IllegalAccessException;
// 	Object instantiate(Property property, Object param)
// 		throws InstantiationException, IllegalAccessException;
// 	Object instantiatePartial(Class<?> cls, Property[] partialProperties)
// 		throws InstantiationException, IllegalAccessException;
// 	
// 	Coder getCoder(Class<?> valueClass);
// 	
// 	String[] getUnfilterableProperties(Class<?> valueClass);
// 	
// 	Object convert(Object value, Type targetType);
// 	
// 	Property createProperty(String name, Field field, Method getter, Method setter);
// 	
// 	FilteredBeanDescriptor createDescriptor(SpearalPropertyFilter filter, Object value);
// }
// 
// Path: src/main/java/org/spearal/configuration/PartialObjectFactory.java
// public interface PartialObjectProxy {
// 
// 	boolean $hasUndefinedProperties();
// 	boolean $isDefined(String propertyName);
// 	boolean $undefine(String propertyName);
// 	Property[] $getDefinedProperties();
// }
// 
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java
// public interface Property {
// 		
// 	String getName();
// 	Class<?> getType();
// 	Type getGenericType();
// 		
// 	boolean hasField();
// 	Field getField();
// 	boolean hasGetter();
// 	Method getGetter();
// 	boolean hasSetter();
// 	Method getSetter();
// 		
// 	Class<?> getDeclaringClass();
// 		
// 	Object init(ExtendedSpearalDecoder decoder, Object holder)
// 		throws InstantiationException, IllegalAccessException, InvocationTargetException;
// 		
// 	Object get(Object holder)
// 		throws IllegalAccessException, InvocationTargetException;
// 		
// 	void set(Object holder, Object value)
// 		throws IllegalAccessException, InvocationTargetException;
// 		
// 	boolean isAnnotationPresent(Class<? extends Annotation> annotationClass);
// 	<A extends Annotation> A getAnnotation(Class<A> annotationClass);
// 		
// 	boolean isReadOnly();
// 		
// 	public void write(ExtendedSpearalEncoder encoder, Object holder)
// 		throws IOException, IllegalAccessException, InvocationTargetException;
// 			
// 	public void read(ExtendedSpearalDecoder decoder, Object holder, int parameterizedType)
// 		throws IOException, InstantiationException, IllegalAccessException, InvocationTargetException;
// }


import java.lang.reflect.Proxy;
import org.spearal.SpearalContext;
import org.spearal.configuration.PartialObjectFactory.PartialObjectProxy;
import org.spearal.configuration.PropertyFactory.Property;
		
		int count = 1;
		for (int i = iSharp + 1; i < description.length(); i++) {
			if (description.charAt(i) == ',')
				count++;
		}
		return count;
	}
	
	public static String createAliasedDescription(SpearalContext context, Class<?> cls, Property[] properties) {
		StringBuilder sb = new StringBuilder(64);

		if (!Proxy.isProxyClass(cls))
			sb.append(context.alias(cls)).append('#');
		else {
			Class<?>[] interfaces = cls.getInterfaces();
			boolean first = true;
			for (int i = 0; i < interfaces.length; i++) {
				if (PartialObjectProxy.class.isAssignableFrom(interfaces[i]))
					continue;
				if (first)
					first = false;
				else
					sb.append(',');
				sb.append(context.alias(interfaces[i]));
			}
			sb.append('#');
		}

		boolean first = true;
// Path: src/main/java/org/spearal/SpearalContext.java
// public interface SpearalContext {
// 
// 	void configure(Configurable configurable);
// 	void configure(Configurable configurable, boolean append);
// 	
// 	Securizer getSecurizer();
// 	
// 	String alias(Class<?> cls);
// 	String unalias(String aliasedClassName);
// 	
// 	Class<?> loadClass(String classNames, Type target)
// 		throws SecurityException;
// 	Object newInstance(Class<?> cls);
// 	
// 	Property[] getProperties(Class<?> cls);
// 	
// 	Object instantiate(Type type, Object param)
// 		throws InstantiationException, IllegalAccessException;
// 	Object instantiate(Property property, Object param)
// 		throws InstantiationException, IllegalAccessException;
// 	Object instantiatePartial(Class<?> cls, Property[] partialProperties)
// 		throws InstantiationException, IllegalAccessException;
// 	
// 	Coder getCoder(Class<?> valueClass);
// 	
// 	String[] getUnfilterableProperties(Class<?> valueClass);
// 	
// 	Object convert(Object value, Type targetType);
// 	
// 	Property createProperty(String name, Field field, Method getter, Method setter);
// 	
// 	FilteredBeanDescriptor createDescriptor(SpearalPropertyFilter filter, Object value);
// }
// 
// Path: src/main/java/org/spearal/configuration/PartialObjectFactory.java
// public interface PartialObjectProxy {
// 
// 	boolean $hasUndefinedProperties();
// 	boolean $isDefined(String propertyName);
// 	boolean $undefine(String propertyName);
// 	Property[] $getDefinedProperties();
// }
// 
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java
// public interface Property {
// 		
// 	String getName();
// 	Class<?> getType();
// 	Type getGenericType();
// 		
// 	boolean hasField();
// 	Field getField();
// 	boolean hasGetter();
// 	Method getGetter();
// 	boolean hasSetter();
// 	Method getSetter();
// 		
// 	Class<?> getDeclaringClass();
// 		
// 	Object init(ExtendedSpearalDecoder decoder, Object holder)
// 		throws InstantiationException, IllegalAccessException, InvocationTargetException;
// 		
// 	Object get(Object holder)
// 		throws IllegalAccessException, InvocationTargetException;
// 		
// 	void set(Object holder, Object value)
// 		throws IllegalAccessException, InvocationTargetException;
// 		
// 	boolean isAnnotationPresent(Class<? extends Annotation> annotationClass);
// 	<A extends Annotation> A getAnnotation(Class<A> annotationClass);
// 		
// 	boolean isReadOnly();
// 		
// 	public void write(ExtendedSpearalEncoder encoder, Object holder)
// 		throws IOException, IllegalAccessException, InvocationTargetException;
// 			
// 	public void read(ExtendedSpearalDecoder decoder, Object holder, int parameterizedType)
// 		throws IOException, InstantiationException, IllegalAccessException, InvocationTargetException;
// }


// Path: src/main/java/org/spearal/impl/util/ClassDescriptionUtil.java
import java.lang.reflect.Proxy;
import org.spearal.SpearalContext;
import org.spearal.configuration.PartialObjectFactory.PartialObjectProxy;
import org.spearal.configuration.PropertyFactory.Property;

		
		int count = 1;
		for (int i = iSharp + 1; i < description.length(); i++) {
			if (description.charAt(i) == ',')
				count++;
		}
		return count;
	}
	
	public static String createAliasedDescription(SpearalContext context, Class<?> cls, Property[] properties) {
		StringBuilder sb = new StringBuilder(64);

		if (!Proxy.isProxyClass(cls))
			sb.append(context.alias(cls)).append('#');
		else {
			Class<?>[] interfaces = cls.getInterfaces();
			boolean first = true;
			for (int i = 0; i < interfaces.length; i++) {
				if (PartialObjectProxy.class.isAssignableFrom(interfaces[i]))
					continue;
				if (first)
					first = false;
				else
					sb.append(',');
				sb.append(context.alias(interfaces[i]));
			}
			sb.append('#');
		}

		boolean first = true;
		for (Property property : properties) {