// Verify that the property type itself (value composites) is not marked as non queryable
Type returnType = typeOf( accessor );
if( !Property.class.isAssignableFrom( Classes.RAW_CLASS.map( returnType ) ) )
{
throw new QueryExpressionException( "Not a property type:" + returnType );
}
Type propertyTypeAsType = GenericPropertyInfo.toPropertyType( returnType );
if( propertyTypeAsType instanceof ParameterizedType )
{
propertyTypeAsType = ( (ParameterizedType) propertyTypeAsType ).getRawType();
}
if( !( propertyTypeAsType instanceof Class ) )
{
throw new QueryExpressionException( "Unsupported property type:" + propertyTypeAsType );
}
@SuppressWarnings( "unchecked" )
Class<T> type = (Class<T>) propertyTypeAsType;
NotQueryableException.throwIfNotQueryable( type );
}