// Path: src/main/java/org/spearal/SpearalDecoder.java
// public interface SpearalDecoder {
// 	
// 	public interface Path {
// 		
// 		Collection<PathSegment> segments();
// 	}
// 	
// 	public interface PathSegment {
// 		
// 		PathSegment copy();
// 	}
// 
// 	public interface CollectionPathSegment extends PathSegment {
// 		
// 		public Collection<?> getCollection();
// 		public int getIndex();
// 	}
// 
// 	public interface ArrayPathSegment extends PathSegment {
// 		
// 		public Object getArray();
// 		public int getIndex();
// 	}
// 	
// 	public interface MapPathSegment extends PathSegment {
// 
// 		public Map<?, ?> getMap();
// 		public Object getKey();
// 	}
// 	
// 	public interface BeanPathSegment extends PathSegment {
// 
// 		public Object getBean();
// 		public Property getProperty();
// 	}
// 
// 	SpearalContext getContext();
// 	
// 	Path getPath();
// 	boolean containsPartialObjects();
// 	Map<Object, List<PathSegment>> getPartialObjectsMap();
// 	
// 	Object readAny() throws IOException;
// 	<T> T readAny(Type targetType) throws IOException;
// 	
// 	void skipAny() throws IOException;
// 	
// 	void printAny(SpearalPrinter printer) throws IOException;
// }
// 
// 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.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Map;
import org.spearal.SpearalDecoder;
import org.spearal.configuration.PropertyFactory.Property;
/**
 * == @Spearal ==>
 * 
 * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.spearal.impl;



/**
 * @author Franck WOLFF
 */
public interface ExtendedSpearalDecoder extends SpearalDecoder {

	Object readAny(int parameterizedType) throws IOException;
	Object readAny(int parameterizedType, Type targetType) throws IOException;
	void skipAny(int parameterizedType) throws IOException;
	
	SpearalDateTime readDateTime(int parameterizedType) throws IOException;
	
	long readIntegral(int parameterizedType) throws IOException;
	
	BigInteger readBigIntegral(int parameterizedType) throws IOException;
	
	double readFloating(int parameterizedType) throws IOException;
	
	BigDecimal readBigFloating(int parameterizedType) throws IOException;

	String readString(int parameterizedType) throws IOException;
	
	byte[] readByteArray(int parameterizedType) throws IOException;
	
	Object readCollection(int parameterizedType, Type targetType) throws IOException;
// Path: src/main/java/org/spearal/SpearalDecoder.java
// public interface SpearalDecoder {
// 	
// 	public interface Path {
// 		
// 		Collection<PathSegment> segments();
// 	}
// 	
// 	public interface PathSegment {
// 		
// 		PathSegment copy();
// 	}
// 
// 	public interface CollectionPathSegment extends PathSegment {
// 		
// 		public Collection<?> getCollection();
// 		public int getIndex();
// 	}
// 
// 	public interface ArrayPathSegment extends PathSegment {
// 		
// 		public Object getArray();
// 		public int getIndex();
// 	}
// 	
// 	public interface MapPathSegment extends PathSegment {
// 
// 		public Map<?, ?> getMap();
// 		public Object getKey();
// 	}
// 	
// 	public interface BeanPathSegment extends PathSegment {
// 
// 		public Object getBean();
// 		public Property getProperty();
// 	}
// 
// 	SpearalContext getContext();
// 	
// 	Path getPath();
// 	boolean containsPartialObjects();
// 	Map<Object, List<PathSegment>> getPartialObjectsMap();
// 	
// 	Object readAny() throws IOException;
// 	<T> T readAny(Type targetType) throws IOException;
// 	
// 	void skipAny() throws IOException;
// 	
// 	void printAny(SpearalPrinter printer) throws IOException;
// }
// 
// 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/ExtendedSpearalDecoder.java
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Map;
import org.spearal.SpearalDecoder;
import org.spearal.configuration.PropertyFactory.Property;

/**
 * == @Spearal ==>
 * 
 * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.spearal.impl;



/**
 * @author Franck WOLFF
 */
public interface ExtendedSpearalDecoder extends SpearalDecoder {

	Object readAny(int parameterizedType) throws IOException;
	Object readAny(int parameterizedType, Type targetType) throws IOException;
	void skipAny(int parameterizedType) throws IOException;
	
	SpearalDateTime readDateTime(int parameterizedType) throws IOException;
	
	long readIntegral(int parameterizedType) throws IOException;
	
	BigInteger readBigIntegral(int parameterizedType) throws IOException;
	
	double readFloating(int parameterizedType) throws IOException;
	
	BigDecimal readBigFloating(int parameterizedType) throws IOException;

	String readString(int parameterizedType) throws IOException;
	
	byte[] readByteArray(int parameterizedType) throws IOException;
	
	Object readCollection(int parameterizedType, Type targetType) throws IOException;
	void readCollection(int parameterizedType, Object holder, Property property)