{
ParameterizedType pt = (ParameterizedType) type;
Type collectionType = pt.getActualTypeArguments()[ 0 ];
if( collectionType instanceof TypeVariable )
{
TypeVariable collectionTypeVariable = (TypeVariable) collectionType;
collectionType = Classes.resolveTypeVariable( collectionTypeVariable, declaringClass, compositeType );
}
ValueType collectedType = newValueType( collectionType, declaringClass, compositeType, layer, module );
valueType = new CollectionType( Classes.RAW_CLASS.map(type) , collectedType );
}
else
{
valueType = new CollectionType( Classes.RAW_CLASS.map(type) , newValueType( Object.class, declaringClass, compositeType, layer, module ) );
}
}
else if( MapType.isMap( type ) )
{
if( type instanceof ParameterizedType )
{
ParameterizedType pt = (ParameterizedType) type;
Type keyType = pt.getActualTypeArguments()[ 0 ];
if( keyType instanceof TypeVariable )
{
TypeVariable keyTypeVariable = (TypeVariable) keyType;
keyType = Classes.resolveTypeVariable( keyTypeVariable, declaringClass, compositeType );
}
ValueType keyedType = newValueType( keyType, declaringClass, compositeType, layer, module );
Type valType = pt.getActualTypeArguments()[ 1 ];
if( valType instanceof TypeVariable )
{
TypeVariable valueTypeVariable = (TypeVariable) valType;
valType = Classes.resolveTypeVariable( valueTypeVariable, declaringClass, compositeType );
}
ValueType valuedType = newValueType( valType, declaringClass, compositeType, layer, module );
valueType = new MapType( Classes.RAW_CLASS.map(type) , keyedType, valuedType );