Model.of()
----------

                 Key: WICKET-2925
                 URL: https://issues.apache.org/jira/browse/WICKET-2925
             Project: Wicket
          Issue Type: New Feature
          Components: wicket
    Affects Versions: 1.4.9
            Reporter: Maarten Billemont


There is a Model.of(T object), but in Guava style, I'd like to see a Model.of() 
which would basically do the same thing as the default constructor (and in fact 
just delegate to it) but would give the developer the benefit of generic type 
inference:

{code}
        public static <T extends Serializable> Model<T> of()
        {
                return new Model<T>();
        }
{code}

This is especially useful for long generic types:

{code}
        IModel<Collection<? extends MyModelObject>> myModel = new 
Model<Collection<? extends MyModelObject>>();
        IModel<Collection<? extends MyModelObject>> myModel = Model.of();
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to