Author: jdonnerstag
Date: Thu Apr 10 10:20:59 2008
New Revision: 646881

URL: http://svn.apache.org/viewvc?rev=646881&view=rev
Log:
generics

Modified:
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/AttributeModifier.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ComponentSourceEntry.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageFactory.java
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageMap.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/application/IComponentInstantiationListener.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RefreshingView.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/IComponentAssignedModel.java
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/collections/ReadOnlyIterator.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.java 
(original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.java 
Thu Apr 10 10:20:59 2008
@@ -132,7 +132,8 @@
         * without being in a request/ being set in the thread local (we need 
that e.g. for when we are
         * in a destruction thread).
         */
-       private static final Map applicationKeyToApplication = new HashMap(1);
+       private static final Map<String, Application> 
applicationKeyToApplication = new HashMap<String, Application>(
+               1);
 
        /** Thread local holder of the application object. */
        private static final ThreadLocal<Application> current = new 
ThreadLocal<Application>();
@@ -140,6 +141,15 @@
        /** Log. */
        private static final Logger log = 
LoggerFactory.getLogger(Application.class);
 
+       /** */
+       private List<IComponentOnBeforeRenderListener> 
componentOnBeforeRenderListeners;
+
+       /** */
+       private List<IComponentOnAfterRenderListener> 
componentOnAfterRenderListeners;
+
+       /** */
+       private List<IHeaderContributor> renderHeadListeners;
+
        /**
         * Checks if the <code>Application</code> threadlocal is set in this 
thread
         * 
@@ -180,7 +190,7 @@
         */
        public static Application get(String applicationKey)
        {
-               Application application = 
(Application)applicationKeyToApplication.get(applicationKey);
+               Application application = 
applicationKeyToApplication.get(applicationKey);
                return application;
        }
 
@@ -191,7 +201,7 @@
         * @return unmodifiable set with keys that correspond with [EMAIL 
PROTECTED] #getApplicationKey()}. Never
         *         null, but possibly empty
         */
-       public static Set/* <String> */getApplicationKeys()
+       public static Set<String> getApplicationKeys()
        {
                return 
Collections.unmodifiableSet(applicationKeyToApplication.keySet());
        }
@@ -226,7 +236,7 @@
        private IConverterLocator converterLocator;
 
        /** list of initializers. */
-       private final List initializers = new ArrayList();
+       private final List<IInitializer> initializers = new 
ArrayList<IInitializer>();
 
        /** Application level meta data. */
        private MetaDataEntry[] metaData;
@@ -268,7 +278,7 @@
                        /**
                         * @see 
org.apache.wicket.application.IComponentInstantiationListener#onInstantiation(org.apache.wicket.Component)
                         */
-                       public void onInstantiation(final Component component)
+                       public void onInstantiation(final Component< ? > 
component)
                        {
                                // If component instantiation is not authorized
                                if 
(!Session.get().getAuthorizationStrategy().isInstantiationAuthorized(
@@ -433,7 +443,7 @@
         * 
         * @return Home page class for this application
         */
-       public abstract Class<? extends Page> getHomePage();
+       public abstract Class< ? extends Page> getHomePage();
 
        /**
         * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT.
@@ -460,6 +470,7 @@
        /**
         * Gets metadata for this application using the given key.
         * 
+        * @param <T>
         * @param key
         *            The key for the data
         * @return The metadata
@@ -732,6 +743,7 @@
         * the correct type for the metadata key, an IllegalArgumentException 
will be thrown. For
         * information on creating MetaDataKeys, see [EMAIL PROTECTED] 
MetaDataKey}.
         * 
+        * @param <T>
         * @param key
         *            The singleton key for the metadata
         * @param object
@@ -765,9 +777,9 @@
         */
        private final void callDestroyers()
        {
-               for (Iterator i = initializers.iterator(); i.hasNext();)
+               for (Iterator<IInitializer> iter = initializers.iterator(); 
iter.hasNext();)
                {
-                       IInitializer initializer = (IInitializer)i.next();
+                       IInitializer initializer = iter.next();
                        if (initializer instanceof IDestroyer)
                        {
                                log.info("[" + getName() + "] destroy: " + 
initializer);
@@ -781,9 +793,9 @@
         */
        private final void callInitializers()
        {
-               for (Iterator i = initializers.iterator(); i.hasNext();)
+               for (Iterator<IInitializer> iter = initializers.iterator(); 
iter.hasNext();)
                {
-                       IInitializer initializer = (IInitializer)i.next();
+                       IInitializer initializer = iter.next();
                        log.info("[" + getName() + "] init: " + initializer);
                        initializer.init(this);
                }
@@ -969,7 +981,7 @@
         * @param component
         *            the component that is being instantiated
         */
-       final void notifyComponentInstantiationListeners(final Component 
component)
+       final void notifyComponentInstantiationListeners(final Component< ? > 
component)
        {
                final int len = componentInstantiationListeners.length;
                for (int i = 0; i < len; i++)
@@ -978,19 +990,18 @@
                }
        }
 
-       private List componentOnBeforeRenderListeners = null;
-
        /**
         * Adds an [EMAIL PROTECTED] IComponentOnBeforeRenderListener}. This 
method should typically only be
         * called during application startup; it is not thread safe.
         * 
         * @param listener
         */
-       final public void 
addComponentOnBeforeRenderListener(IComponentOnBeforeRenderListener listener)
+       final public void addComponentOnBeforeRenderListener(
+               final IComponentOnBeforeRenderListener listener)
        {
                if (componentOnBeforeRenderListeners == null)
                {
-                       componentOnBeforeRenderListeners = new ArrayList();
+                       componentOnBeforeRenderListeners = new 
ArrayList<IComponentOnBeforeRenderListener>();
                }
 
                if (componentOnBeforeRenderListeners.contains(listener) == 
false)
@@ -1005,7 +1016,7 @@
         * @param listener
         */
        final public void removeComponentOnBeforeRenderListener(
-               IComponentOnBeforeRenderListener listener)
+               final IComponentOnBeforeRenderListener listener)
        {
                if (componentOnBeforeRenderListeners != null)
                {
@@ -1022,31 +1033,30 @@
         * 
         * @param component
         */
-       final void notifyComponentOnBeforeRenderListeners(Component component)
+       final void notifyComponentOnBeforeRenderListeners(final Component< ? > 
component)
        {
                if (componentOnBeforeRenderListeners != null)
                {
-                       for (Iterator i = 
componentOnBeforeRenderListeners.iterator(); i.hasNext();)
+                       for (Iterator<IComponentOnBeforeRenderListener> iter = 
componentOnBeforeRenderListeners.iterator(); iter.hasNext();)
                        {
-                               IComponentOnBeforeRenderListener listener = 
(IComponentOnBeforeRenderListener)i.next();
+                               IComponentOnBeforeRenderListener listener = 
iter.next();
                                listener.onBeforeRender(component);
                        }
                }
        }
 
-       private List componentOnAfterRenderListeners = null;
-
        /**
         * Adds an [EMAIL PROTECTED] IComponentOnAfterRenderListener}. This 
method should typically only be called
         * during application startup; it is not thread safe.
         * 
         * @param listener
         */
-       final public void 
addComponentOnAfterRenderListener(IComponentOnAfterRenderListener listener)
+       final public void addComponentOnAfterRenderListener(
+               final IComponentOnAfterRenderListener listener)
        {
                if (componentOnAfterRenderListeners == null)
                {
-                       componentOnAfterRenderListeners = new ArrayList();
+                       componentOnAfterRenderListeners = new 
ArrayList<IComponentOnAfterRenderListener>();
                }
 
                if (componentOnAfterRenderListeners.contains(listener) == false)
@@ -1060,7 +1070,8 @@
         * 
         * @param listener
         */
-       final public void 
removeComponentOnAfterRenderListener(IComponentOnAfterRenderListener listener)
+       final public void removeComponentOnAfterRenderListener(
+               final IComponentOnAfterRenderListener listener)
        {
                if (componentOnAfterRenderListeners != null)
                {
@@ -1077,30 +1088,28 @@
         * 
         * @param component
         */
-       final void notifyComponentOnAfterRenderListeners(Component component)
+       final void notifyComponentOnAfterRenderListeners(final Component< ? > 
component)
        {
                if (componentOnAfterRenderListeners != null)
                {
-                       for (Iterator i = 
componentOnAfterRenderListeners.iterator(); i.hasNext();)
+                       for (Iterator<IComponentOnAfterRenderListener> iter = 
componentOnAfterRenderListeners.iterator(); iter.hasNext();)
                        {
-                               IComponentOnAfterRenderListener listener = 
(IComponentOnAfterRenderListener)i.next();
+                               IComponentOnAfterRenderListener listener = 
iter.next();
                                listener.onAfterRender(component);
                        }
                }
        }
 
-       private List renderHeadListeners = null;
-
        /**
         * Adds a listener that will be invoked for every header response
         * 
         * @param listener
         */
-       public final void addRenderHeadListener(IHeaderContributor listener)
+       public final void addRenderHeadListener(final IHeaderContributor 
listener)
        {
                if (renderHeadListeners == null)
                {
-                       renderHeadListeners = new ArrayList();
+                       renderHeadListeners = new 
ArrayList<IHeaderContributor>();
                }
                renderHeadListeners.add(listener);
        }
@@ -1109,7 +1118,7 @@
         * 
         * @param listener
         */
-       public void removeRenderHeadListener(IHeaderContributor listener)
+       public void removeRenderHeadListener(final IHeaderContributor listener)
        {
                if (renderHeadListeners != null)
                {
@@ -1126,13 +1135,13 @@
         * 
         * @param response
         */
-       public void notifyRenderHeadListener(IHeaderResponse response)
+       public void notifyRenderHeadListener(final IHeaderResponse response)
        {
                if (renderHeadListeners != null)
                {
-                       for (Iterator i = renderHeadListeners.iterator(); 
i.hasNext();)
+                       for (Iterator<IHeaderContributor> iter = 
renderHeadListeners.iterator(); iter.hasNext();)
                        {
-                               IHeaderContributor listener = 
(IHeaderContributor)i.next();
+                               IHeaderContributor listener = iter.next();
                                listener.renderHead(response);
                        }
                }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/AttributeModifier.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/AttributeModifier.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/AttributeModifier.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/AttributeModifier.java
 Thu Apr 10 10:20:59 2008
@@ -85,7 +85,7 @@
        private final String pattern;
 
        /** The model that is to be used for the replacement. */
-       private final IModel replaceModel;
+       private final IModel< ? > replaceModel;
 
        /**
         * Create a new attribute modifier with the given attribute name and 
model to replace with. The
@@ -99,7 +99,7 @@
         *            The model to replace the value with
         */
        public AttributeModifier(final String attribute, final boolean 
addAttributeIfNotPresent,
-                       final IModel replaceModel)
+               final IModel< ? > replaceModel)
        {
                this(attribute, null, addAttributeIfNotPresent, replaceModel);
        }
@@ -113,7 +113,7 @@
         * @param replaceModel
         *            The model to replace the value with
         */
-       public AttributeModifier(final String attribute, final IModel 
replaceModel)
+       public AttributeModifier(final String attribute, final IModel< ? > 
replaceModel)
        {
                this(attribute, null, false, replaceModel);
        }
@@ -135,7 +135,7 @@
         *            The model to replace the value with
         */
        public AttributeModifier(final String attribute, final String pattern,
-                       final boolean addAttributeIfNotPresent, final IModel 
replaceModel)
+               final boolean addAttributeIfNotPresent, final IModel< ? > 
replaceModel)
        {
                if (attribute == null)
                {
@@ -161,7 +161,8 @@
         * @param replaceModel
         *            The model to replace the value with
         */
-       public AttributeModifier(final String attribute, final String pattern, 
final IModel replaceModel)
+       public AttributeModifier(final String attribute, final String pattern,
+               final IModel< ? > replaceModel)
        {
                this(attribute, pattern, false, replaceModel);
        }
@@ -174,7 +175,8 @@
         * @param component
         *            the model that initiates the detachment
         */
-       public final void detach(Component component)
+       @Override
+       public final void detach(Component< ? > component)
        {
                if (replaceModel != null)
                {
@@ -212,6 +214,7 @@
         * @return Whether enabled or not
         * @deprecated
         */
+       @Deprecated
        public final boolean isEnabled()
        {
                return enabled;
@@ -222,7 +225,8 @@
         * 
         * @see 
org.apache.wicket.behavior.AbstractBehavior#isEnabled(org.apache.wicket.Component)
         */
-       public boolean isEnabled(Component component)
+       @Override
+       public boolean isEnabled(Component< ? > component)
        {
                return enabled;
        }
@@ -231,7 +235,8 @@
         * @see 
org.apache.wicket.behavior.IBehavior#onComponentTag(org.apache.wicket.Component,
         *      org.apache.wicket.markup.ComponentTag)
         */
-       public final void onComponentTag(Component component, ComponentTag tag)
+       @Override
+       public final void onComponentTag(Component< ? > component, ComponentTag 
tag)
        {
                if (tag.getType() != XmlTag.CLOSE)
                {
@@ -249,7 +254,7 @@
         * @param tag
         *            The tag to replace the attribute value for
         */
-       public final void replaceAttibuteValue(final Component component, final 
ComponentTag tag)
+       public final void replaceAttibuteValue(final Component< ? > component, 
final ComponentTag tag)
        {
                if (isEnabled(component))
                {
@@ -290,13 +295,18 @@
                }
        }
 
+       /**
+        * 
+        * @param value
+        * @return
+        */
        protected String getContextRelativeValue(String value)
        {
                if ("href".equals(attribute) || "src".equals(attribute))
                {
                        RequestContext rc = RequestContext.get();
                        if (rc.isPortletRequest() &&
-                                       !(value.startsWith("http://";) || 
value.startsWith("https://";)))
+                               !(value.startsWith("http://";) || 
value.startsWith("https://";)))
                        {
                                if ("href".equals(attribute))
                                {
@@ -325,16 +335,22 @@
        /**
         * @see java.lang.Object#toString()
         */
+       @Override
        public String toString()
        {
                return "[AttributeModifier attribute=" + attribute + ", 
enabled=" + enabled + ", pattern=" +
-                               pattern + ", replacementModel=" + replaceModel 
+ "]";
+                       pattern + ", replacementModel=" + replaceModel + "]";
        }
 
-       /* gets replacement with null check. */
-       private Object getReplacementOrNull(final Component component)
+       /**
+        * gets replacement with null check.
+        * 
+        * @param component
+        * @return
+        */
+       private Object getReplacementOrNull(final Component< ? > component)
        {
-               IModel model = replaceModel;
+               IModel< ? > model = replaceModel;
                if (model instanceof IComponentAssignedModel)
                {
                        model = 
((IComponentAssignedModel)model).wrapOnAssignment(component);
@@ -342,7 +358,12 @@
                return (model != null) ? model.getObject() : null;
        }
 
-       /* gets replacement as a string with null check. */
+       /**
+        * gets replacement as a string with null check.
+        * 
+        * @param replacementValue
+        * @return
+        */
        private String toStringOrNull(final Object replacementValue)
        {
                return (replacementValue != null) ? replacementValue.toString() 
: null;
@@ -353,7 +374,7 @@
         * 
         * @return the replace model of this attribute modifier
         */
-       protected final IModel getReplaceModel()
+       protected final IModel< ? > getReplaceModel()
        {
                return replaceModel;
        }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java 
(original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java 
Thu Apr 10 10:20:59 2008
@@ -673,7 +673,7 @@
        private String id;
 
        /** Any parent container. */
-       private MarkupContainer parent;
+       private MarkupContainer< ? > parent;
 
        /**
         * I really dislike it, but for now we need it. Reason: due to 
transparent containers and
@@ -950,11 +950,19 @@
                return this;
        }
 
+       /**
+        * 
+        * @param behavior
+        */
        private void addBehavior(final IBehavior behavior)
        {
                data_add(behavior);
        }
 
+       /**
+        * 
+        * @return
+        */
        private List<IBehavior> getBehaviorsImpl()
        {
                if (data != null)
@@ -1204,10 +1212,10 @@
         * @return First container parent that is an instance of the given 
class, or null if none can be
         *         found
         */
-       public final MarkupContainer findParent(final Class< ? extends 
MarkupContainer> c)
+       public final MarkupContainer< ? > findParent(final Class< ? extends 
MarkupContainer> c)
        {
                // Start with immediate parent
-               MarkupContainer current = parent;
+               MarkupContainer< ? > current = parent;
 
                // Walk up containment hierarchy
                while (current != null)
@@ -1229,9 +1237,9 @@
        /**
         * @return The nearest markup container with associated markup
         */
-       public final MarkupContainer findParentWithAssociatedMarkup()
+       public final MarkupContainer< ? > findParentWithAssociatedMarkup()
        {
-               MarkupContainer container = parent;
+               MarkupContainer< ? > container = parent;
                while (container != null)
                {
                        if (container.hasAssociatedMarkup())
@@ -1708,7 +1716,7 @@
         * 
         * @return Any parent container, or null if there is none
         */
-       public final MarkupContainer getParent()
+       public final MarkupContainer< ? > getParent()
        {
                return parent;
        }
@@ -1791,7 +1799,7 @@
         */
        public long getSizeInBytes()
        {
-               final MarkupContainer originalParent = parent;
+               final MarkupContainer< ? > originalParent = parent;
                parent = null;
                long size = -1;
                try
@@ -2431,7 +2439,7 @@
                else
                {
                        // Save the parent's markup stream to re-assign it at 
the end
-                       MarkupContainer parent = getParent();
+                       MarkupContainer< ? > parent = getParent();
                        MarkupStream originalMarkupStream = 
parent.getMarkupStream();
                        MarkupStream markupStream = locateMarkupStream();
 
@@ -2851,6 +2859,11 @@
                return this;
        }
 
+       /**
+        * 
+        * 
+        * @return
+        */
        @SuppressWarnings("unchecked")
        IModel<T> getModelImpl()
        {
@@ -2864,6 +2877,10 @@
                }
        }
 
+       /**
+        * 
+        * @param model
+        */
        void setModelImpl(IModel<T> model)
        {
                if (getFlag(FLAG_MODEL_SET))
@@ -2886,8 +2903,6 @@
                                setFlag(FLAG_MODEL_SET, true);
                        }
                }
-
-
        }
 
        /**
@@ -3233,7 +3248,7 @@
         *            The visitor to call at each parent of the given type
         * @return First non-null value returned by visitor callback
         */
-       public final Object visitParents(final Class< ? extends 
MarkupContainer> c,
+       public final Object visitParents(final Class< ? extends 
MarkupContainer< ? >> c,
                final IVisitor<Component< ? >> visitor)
        {
                // Start here
@@ -4005,17 +4020,13 @@
         *            The model to wrap if need be
         * @return The wrapped model
         */
-       @SuppressWarnings("unchecked")
-       protected final IModel wrap(final IModel model)
+       protected final IModel wrap(final IModel< ? > model)
        {
                if (model instanceof IComponentAssignedModel)
                {
                        return 
((IComponentAssignedModel)model).wrapOnAssignment(this);
                }
-               else
-               {
-                       return model;
-               }
+               return model;
        }
 
        /**
@@ -4032,7 +4043,7 @@
         *            Path to component
         * @return The component at the path
         */
-       Component<T> get(final String path)
+       Component< ? > get(final String path)
        {
                // Path to this component is an empty path
                if (path.equals(""))
@@ -4055,6 +4066,9 @@
                return getMarkupId() != null;
        }
 
+       /**
+        * 
+        */
        void internalMarkRendering()
        {
                setFlag(FLAG_PREPARED_FOR_RENDER, false);
@@ -4077,11 +4091,18 @@
                return false;
        }
 
+       /**
+        * 
+        * @return
+        */
        boolean isPreparedForRender()
        {
                return getFlag(FLAG_PREPARED_FOR_RENDER);
        }
 
+       /**
+        * 
+        */
        void onAfterRenderChildren()
        {
        }
@@ -4167,7 +4188,7 @@
         * @param parent
         *            The parent container
         */
-       final void setParent(final MarkupContainer parent)
+       final void setParent(final MarkupContainer< ? > parent)
        {
                if (this.parent != null && log.isDebugEnabled())
                {
@@ -4209,7 +4230,7 @@
         * @param allowed
         * @return <code>this</code> for chaining
         */
-       public final Component setVisibilityAllowed(boolean allowed)
+       public final Component<T> setVisibilityAllowed(boolean allowed)
        {
                setFlag(FLAG_VISIBILITY_ALLOWED, allowed);
                return this;
@@ -4238,7 +4259,11 @@
                return isVisible() && isRenderAllowed() && 
isVisibilityAllowed();
        }
 
-
+       /**
+        * 
+        * @param s
+        * @throws IOException
+        */
        private void writeObject(java.io.ObjectOutputStream s) throws 
IOException
        {
                if (this instanceof Page)
@@ -4251,6 +4276,12 @@
                }
        }
 
+       /**
+        * 
+        * @param s
+        * @throws IOException
+        * @throws ClassNotFoundException
+        */
        private void readObject(java.io.ObjectInputStream s) throws 
IOException, ClassNotFoundException
        {
                if (this instanceof Page)

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ComponentSourceEntry.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ComponentSourceEntry.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ComponentSourceEntry.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ComponentSourceEntry.java
 Thu Apr 10 10:20:59 2008
@@ -51,10 +51,10 @@
        private final void checkId(String name, String id)
        {
                if (id.indexOf('(') != -1 || id.indexOf('(') != -1 || 
id.indexOf(' ') != -1 ||
-                               id.indexOf(',') != -1)
+                       id.indexOf(',') != -1)
                {
                        throw new IllegalStateException(name + "'" + id +
-                                       "' is not valid, it may not contain any 
of the ' ', '(', ')', ',' characters");
+                               "' is not valid, it may not contain any of the 
' ', '(', ')', ',' characters");
                }
        }
 
@@ -64,7 +64,7 @@
         * @param buffer
         * @param component
         */
-       private final void appendComponent(AppendingStringBuffer buffer, 
Component component)
+       private final void appendComponent(AppendingStringBuffer buffer, 
Component< ? > component)
        {
                checkId("Component id", component.getId());
                buffer.append(component.getId());
@@ -89,14 +89,14 @@
                buffer.append(component.markupIndex);
 
                if (component instanceof MarkupContainer &&
-                               
((MarkupContainer)component).iterator().hasNext())
+                       ((MarkupContainer< ? >)component).iterator().hasNext())
                {
                        buffer.append('(');
 
-                       Iterator i = ((MarkupContainer)component).iterator();
+                       Iterator<Component< ? >> i = 
((MarkupContainer)component).iterator();
                        while (i.hasNext())
                        {
-                               Component child = (Component)i.next();
+                               Component< ? > child = i.next();
                                appendComponent(buffer, child);
                                if (i.hasNext())
                                {
@@ -115,8 +115,8 @@
         * @param component
         * @param componentSource
         */
-       ComponentSourceEntry(MarkupContainer container, Component component,
-                       IComponentSource componentSource)
+       ComponentSourceEntry(MarkupContainer< ? > container, Component< ? > 
component,
+               IComponentSource componentSource)
        {
                id = component.getId();
 
@@ -136,7 +136,7 @@
         * @param index
         * @param child
         */
-       protected abstract void setChild(MarkupContainer parent, int index, 
Component child);
+       protected abstract void setChild(MarkupContainer< ? > parent, int 
index, Component< ? > child);
 
        /**
         * Reconstructs the component
@@ -147,9 +147,9 @@
         *            position in parent's children
         * @return
         */
-       Component reconstruct(MarkupContainer parent, int index)
+       Component< ? > reconstruct(MarkupContainer< ? > parent, int index)
        {
-               Component component = componentSource.restoreComponent(id);
+               Component< ? > component = componentSource.restoreComponent(id);
 
                if (parent != null)
                {
@@ -204,8 +204,8 @@
         * @param component
         * @return
         */
-       private static MarkupContainer applyComponentInfo(MarkupContainer 
parent, String info,
-                       Component component)
+       private static MarkupContainer< ? > applyComponentInfo(MarkupContainer< 
? > parent,
+               String info, Component< ? > component)
        {
                if (parent == null)
                {
@@ -248,9 +248,8 @@
 
                if (component == null)
                {
-                       logger
-                                       .warn("Couldn't find component with id 
'" + id +
-                                                       "'. This means that the 
component was not properly reconstructed from ComponentSource.");
+                       logger.warn("Couldn't find component with id '" + id +
+                               "'. This means that the component was not 
properly reconstructed from ComponentSource.");
                }
                else
                {
@@ -260,7 +259,7 @@
                        }
                        component.markupIndex = (short)markupIndex;
                }
-               return component instanceof MarkupContainer ? 
(MarkupContainer)component : null;
+               return component instanceof MarkupContainer ? (MarkupContainer< 
? >)component : null;
        }
 
        /**
@@ -275,7 +274,8 @@
         * @param info
         * @return
         */
-       private static int parseComponentInfo(MarkupContainer parent, String 
info, Component component)
+       private static int parseComponentInfo(MarkupContainer< ? > parent, 
String info,
+               Component< ? > component)
        {
                // find the first part for the component
                final String substring = getComponentSubString(info);
@@ -289,7 +289,7 @@
                        ++len; // skip the '('
                }
 
-               final MarkupContainer child = applyComponentInfo(parent, 
substring, component);
+               final MarkupContainer< ? > child = applyComponentInfo(parent, 
substring, component);
 
                if (hasChildren)
                {

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageFactory.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageFactory.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageFactory.java 
(original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageFactory.java 
Thu Apr 10 10:20:59 2008
@@ -43,7 +43,7 @@
         * @throws WicketRuntimeException
         *             Thrown if the page cannot be constructed
         */
-       Page newPage(final Class pageClass);
+       Page newPage(final Class< ? extends Page> pageClass);
 
        /**
         * Creates a new Page, passing PageParameters to the Page constructor 
if such a constructor
@@ -58,5 +58,5 @@
         * @throws WicketRuntimeException
         *             Thrown if the page cannot be constructed
         */
-       Page newPage(final Class pageClass, final PageParameters parameters);
+       Page newPage(final Class< ? extends Page> pageClass, final 
PageParameters parameters);
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageMap.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageMap.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageMap.java 
(original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/IPageMap.java 
Thu Apr 10 10:20:59 2008
@@ -100,7 +100,7 @@
         * @param pageClazz
         *            The page clazz to temporarily redirect to
         */
-       void redirectToInterceptPage(final Class pageClazz);
+       void redirectToInterceptPage(final Class< ? extends Page> pageClazz);
 
        /**
         * Redirects browser to an intermediate page such as a sign-in page. 
The current request's url

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
 Thu Apr 10 10:20:59 2008
@@ -125,7 +125,7 @@
         *             Thrown if a child with the same id is replaced by the 
add operation.
         * @return This
         */
-       public final MarkupContainer<T> add(final Component child)
+       public final MarkupContainer<T> add(final Component< ? > child)
        {
                checkHierarchyChange(child);
 
@@ -158,7 +158,7 @@
         *            The child
         * @return This
         */
-       public final MarkupContainer<T> addOrReplace(final Component child)
+       public final MarkupContainer<T> addOrReplace(final Component< ? > child)
        {
                checkHierarchyChange(child);
 
@@ -198,7 +198,7 @@
         *            stream to be used to render the component.
         * @return True, if component has been added
         */
-       public final boolean autoAdd(final Component component, final 
MarkupStream markupStream)
+       public final boolean autoAdd(final Component< ? > component, final 
MarkupStream markupStream)
        {
                if (component == null)
                {
@@ -242,7 +242,7 @@
         * @deprecated since 1.3 Please use [EMAIL PROTECTED] 
#autoAdd(Component, MarkupStream)} instead
         */
        @Deprecated
-       public final boolean autoAdd(final Component component)
+       public final boolean autoAdd(final Component< ? > component)
        {
                return autoAdd(component, null);
        }
@@ -254,7 +254,7 @@
         *            True if all descendents should be considered
         * @return True if the component is contained in this container
         */
-       public final boolean contains(final Component component, final boolean 
recurse)
+       public final boolean contains(final Component< ? > component, final 
boolean recurse)
        {
                if (component == null)
                {
@@ -264,10 +264,10 @@
                if (recurse)
                {
                        // Start at component and continue while we're not out 
of parents
-                       for (Component current = component; current != null;)
+                       for (Component< ? > current = component; current != 
null;)
                        {
                                // Get parent
-                               final MarkupContainer parent = 
current.getParent();
+                               final MarkupContainer< ? > parent = 
current.getParent();
 
                                // If this container is the parent, then the 
component is
                                // recursively contained by this container
@@ -299,7 +299,7 @@
         * @return The component at the path
         */
        @Override
-       public final Component get(final String path)
+       public final Component< ? > get(final String path)
        {
                // Reference to this container
                if (path == null || path.trim().equals(""))
@@ -311,7 +311,7 @@
                final String id = Strings.firstPathComponent(path, 
Component.PATH_SEPARATOR);
 
                // Get child by id
-               Component child = children_get(id);
+               Component< ? > child = children_get(id);
 
                // If the container is transparent, than ask its parent.
                // ParentResolver does something quite similar, but because of 
<head>,
@@ -401,7 +401,7 @@
         * @throws IllegalArgumentException
         *             Thrown if a child with the same id is replaced by the 
add operation.
         */
-       public void internalAdd(final Component child)
+       public void internalAdd(final Component< ? > child)
        {
                if (log.isDebugEnabled())
                {
@@ -430,9 +430,9 @@
        /**
         * @return Iterator that iterates through children in the order they 
were added
         */
-       public final Iterator<Component> iterator()
+       public final Iterator<Component< ? >> iterator()
        {
-               return new Iterator<Component>()
+               return new Iterator<Component< ? >>()
                {
                        int index = 0;
 
@@ -441,14 +441,14 @@
                                return index < children_size();
                        }
 
-                       public Component next()
+                       public Component< ? > next()
                        {
                                return children_get(index++);
                        }
 
                        public void remove()
                        {
-                               final Component removed = 
children_remove(--index);
+                               final Component< ? > removed = 
children_remove(--index);
                                checkHierarchyChange(removed);
                                removedComponent(removed);
                        }
@@ -460,9 +460,9 @@
         *            The comparator
         * @return Iterator that iterates over children in the order specified 
by comparator
         */
-       public final Iterator<Component> iterator(Comparator comparator)
+       public final Iterator<Component< ? >> iterator(Comparator<Component< ? 
>> comparator)
        {
-               final List<Component> sorted;
+               final List<Component< ? >> sorted;
                if (children == null)
                {
                        sorted = Collections.emptyList();
@@ -471,8 +471,8 @@
                {
                        if (children instanceof Component)
                        {
-                               sorted = new ArrayList<Component>(1);
-                               sorted.add((Component)children);
+                               sorted = new ArrayList<Component< ? >>(1);
+                               sorted.add((Component< ? >)children);
                        }
                        else if (children instanceof ChildList)
                        {
@@ -480,7 +480,7 @@
                        }
                        else
                        {
-                               sorted = Arrays.asList((Component[])children);
+                               sorted = Arrays.asList((Component< ? 
>[])children);
                        }
                }
                Collections.sort(sorted, comparator);
@@ -496,7 +496,8 @@
         *             throws an [EMAIL PROTECTED] IllegalStateException}
         */
        // TODO remove after release 1.3.0
-       public final IResourceStream newMarkupResourceStream(Class 
containerClass)
+       public final IResourceStream newMarkupResourceStream(
+               Class< ? extends Component< ? >> containerClass)
        {
                throw new IllegalStateException(
                        "this method is not used any more (and shouldn't be 
called by clients anyway)");
@@ -506,7 +507,7 @@
         * @param component
         *            Component to remove from this container
         */
-       public void remove(final Component component)
+       public void remove(final Component< ? > component)
        {
                checkHierarchyChange(component);
 
@@ -532,7 +533,7 @@
                        throw new IllegalArgumentException("argument id may not 
be null");
                }
 
-               final Component component = get(id);
+               final Component< ? > component = get(id);
                if (component != null)
                {
                        remove(component);
@@ -575,7 +576,7 @@
                                        for (int i = 0; i < size; i++)
                                        {
                                                // Get next child
-                                               final Component child = 
children_get(i);
+                                               final Component< ? > child = 
children_get(i);
                                                
child.setParent(MarkupContainer.this);
                                        }
                                }
@@ -589,7 +590,7 @@
                                if (childObject instanceof Component)
                                {
                                        // Get next child
-                                       final Component child = 
(Component)childObject;
+                                       final Component< ? > child = 
(Component< ? >)childObject;
 
                                        // Do not call remove() because the 
state change would than be
                                        // recorded twice.
@@ -670,7 +671,7 @@
         *             Thrown if there was no child with the same id.
         * @return This
         */
-       public final MarkupContainer<T> replace(final Component child)
+       public final MarkupContainer<T> replace(final Component< ? > child)
        {
                checkHierarchyChange(child);
 
@@ -687,7 +688,7 @@
                if (child.getParent() != this)
                {
                        // Add to map
-                       final Component replaced = put(child);
+                       final Component< ? > replaced = put(child);
 
                        // Look up to make sure it was already in the map
                        if (replaced == null)
@@ -719,18 +720,18 @@
        @Override
        public MarkupContainer<T> setModel(final IModel<T> model)
        {
-               final IModel previous = getModelImpl();
+               final IModel< ? > previous = getModelImpl();
                super.setModel(model);
                if (previous instanceof IComponentInheritedModel)
                {
-                       visitChildren(new IVisitor()
+                       visitChildren(new IVisitor<Component< ? >>()
                        {
-                               public Object component(Component component)
+                               public Object component(Component< ? > 
component)
                                {
-                                       IModel compModel = component.getModel();
+                                       IModel< ? > compModel = 
component.getModel();
                                        if (compModel instanceof IWrapModel)
                                        {
-                                               compModel = 
((IWrapModel)compModel).getWrappedModel();
+                                               compModel = ((IWrapModel< ? 
>)compModel).getWrappedModel();
                                        }
                                        if (compModel == previous)
                                        {
@@ -794,7 +795,7 @@
                                for (int i = 0; i < size; i++)
                                {
                                        // Get next child
-                                       final Component child = children_get(i);
+                                       final Component< ? > child = 
children_get(i);
                                        if (i != 0)
                                        {
                                                buffer.append(' ');
@@ -818,7 +819,7 @@
         * @return The return value from a visitor which halted the traversal, 
or null if the entire
         *         traversal occurred
         */
-       public final Object visitChildren(final Class clazz, final IVisitor 
visitor)
+       public final Object visitChildren(final Class< ? > clazz, final 
IVisitor visitor)
        {
                if (visitor == null)
                {
@@ -829,7 +830,7 @@
                for (int i = 0; i < children_size(); i++)
                {
                        // Get next child component
-                       final Component child = children_get(i);
+                       final Component< ? > child = children_get(i);
                        Object value = null;
 
                        // Is the child of the correct class (or was no class 
specified)?
@@ -851,7 +852,7 @@
                                (value != 
IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER))
                        {
                                // visit the children in the container
-                               value = 
((MarkupContainer)child).visitChildren(clazz, visitor);
+                               value = ((MarkupContainer< ? 
>)child).visitChildren(clazz, visitor);
 
                                // If visitor returns a non-null value, it 
halts the traversal
                                if ((value != IVisitor.CONTINUE_TRAVERSAL) &&
@@ -874,7 +875,7 @@
         * @return The return value from a visitor which halted the traversal, 
or null if the entire
         *         traversal occurred
         */
-       public final Object visitChildren(final IVisitor visitor)
+       public final Object visitChildren(final IVisitor< ? > visitor)
        {
                return visitChildren(null, visitor);
        }
@@ -883,7 +884,7 @@
         * @param component
         *            Component being added
         */
-       private final void addedComponent(final Component component)
+       private final void addedComponent(final Component< ? > component)
        {
                // Check for degenerate case
                if (component == this)
@@ -891,7 +892,7 @@
                        throw new IllegalArgumentException("Component can't be 
added to itself");
                }
 
-               MarkupContainer parent = component.getParent();
+               MarkupContainer< ? > parent = component.getParent();
                if (parent != null)
                {
                        parent.remove(component);
@@ -927,7 +928,7 @@
         * @param child
         *            Child to add
         */
-       private final void children_add(final Component child)
+       private final void children_add(final Component< ? > child)
        {
                if (children == null)
                {
@@ -944,9 +945,14 @@
                }
        }
 
-       private final Component children_get(int index)
+       /**
+        * 
+        * @param index
+        * @return
+        */
+       private final Component< ? > children_get(int index)
        {
-               return (Component)children_get(index, true);
+               return (Component< ? >)children_get(index, true);
        }
 
        /**
@@ -960,8 +966,8 @@
         * @param index
         * @return
         */
-       private final Object postprocess(Object object, boolean reconstruct, 
MarkupContainer parent,
-               int index)
+       private final Object postprocess(Object object, boolean reconstruct,
+               MarkupContainer< ? > parent, int index)
        {
                if (reconstruct && object instanceof ComponentSourceEntry)
                {
@@ -970,6 +976,12 @@
                return object;
        }
 
+       /**
+        * 
+        * @param index
+        * @param reconstruct
+        * @return
+        */
        private final Object children_get(int index, boolean reconstruct)
        {
                Object component = null;
@@ -1020,7 +1032,7 @@
        {
                if (object instanceof Component)
                {
-                       return ((Component)object).getId();
+                       return ((Component< ? >)object).getId();
                }
                else if (object instanceof ComponentSourceEntry)
                {
@@ -1032,18 +1044,23 @@
                }
        }
 
-       private final Component children_get(final String id)
+       /**
+        * 
+        * @param id
+        * @return
+        */
+       private final Component< ? > children_get(final String id)
        {
                if (children == null)
                {
                        return null;
                }
-               Component component = null;
-               if (children instanceof Object[] == false && children 
instanceof List == false)
+               Component< ? > component = null;
+               if ((children instanceof Object[] == false) && (children 
instanceof List == false))
                {
                        if (getId(children).equals(id))
                        {
-                               component = (Component)postprocess(children, 
true, this, 0);
+                               component = (Component< ? 
>)postprocess(children, true, this, 0);
                                if (children != component)
                                {
                                        children = component;
@@ -1068,7 +1085,7 @@
                        {
                                if (getId(children[i]).equals(id))
                                {
-                                       component = 
(Component)postprocess(children[i], true, this, i);
+                                       component = (Component< ? 
>)postprocess(children[i], true, this, i);
                                        if (children[i] != component)
                                        {
                                                children[i] = component;
@@ -1080,7 +1097,12 @@
                return component;
        }
 
-       private final int children_indexOf(Component child)
+       /**
+        * 
+        * @param child
+        * @return
+        */
+       private final int children_indexOf(Component< ? > child)
        {
                if (children == null)
                {
@@ -1119,7 +1141,12 @@
                return -1;
        }
 
-       private final Component children_remove(Component component)
+       /**
+        * 
+        * @param component
+        * @return
+        */
+       private final Component< ? > children_remove(Component< ? > component)
        {
                int index = children_indexOf(component);
                if (index != -1)
@@ -1129,7 +1156,12 @@
                return null;
        }
 
-       private final Component children_remove(int index)
+       /**
+        * 
+        * @param index
+        * @return
+        */
+       private final Component< ? > children_remove(int index)
        {
                if (children == null)
                        return null;
@@ -1138,7 +1170,7 @@
                {
                        if (index == 0)
                        {
-                               final Component removed = 
(Component)postprocess(children, true, null, -1);
+                               final Component< ? > removed = (Component< ? 
>)postprocess(children, true, null, -1);
                                children = null;
                                return removed;
                        }
@@ -1167,7 +1199,7 @@
                                        {
                                                throw new 
IndexOutOfBoundsException();
                                        }
-                                       return (Component)postprocess(removed, 
true, null, -1);
+                                       return (Component< ? 
>)postprocess(removed, true, null, -1);
                                }
                                children = new ChildList(children);
                        }
@@ -1178,10 +1210,17 @@
                        {
                                children = lst.get(0);
                        }
-                       return (Component)postprocess(removed, true, null, -1);
+                       return (Component< ? >)postprocess(removed, true, null, 
-1);
                }
        }
 
+       /**
+        * 
+        * @param index
+        * @param child
+        * @param reconstruct
+        * @return
+        */
        private final Object children_set(int index, Object child, boolean 
reconstruct)
        {
                Object replaced;
@@ -1213,11 +1252,21 @@
                return postprocess(replaced, reconstruct, null, -1);
        }
 
-       private final Component children_set(int index, Component child)
+       /**
+        * 
+        * @param index
+        * @param child
+        * @return
+        */
+       private final Component< ? > children_set(int index, Component< ? > 
child)
        {
-               return (Component)children_set(index, child, true);
+               return (Component< ? >)children_set(index, child, true);
        }
 
+       /**
+        * 
+        * @return
+        */
        private final int children_size()
        {
                if (children == null)
@@ -1245,7 +1294,7 @@
         *            The child to put into the map
         * @return Any component that was replaced
         */
-       private final Component put(final Component child)
+       private final Component< ? > put(final Component< ? > child)
        {
                int index = children_indexOf(child);
                if (index == -1)
@@ -1263,7 +1312,7 @@
         * @param component
         *            Component being removed
         */
-       private final void removedComponent(final Component component)
+       private final void removedComponent(final Component< ? > component)
        {
                // Notify Page that component is being removed
                final Page page = component.findPage();
@@ -1299,7 +1348,7 @@
                        final String id = tag.getId();
 
                        // Get the component for the id from the given container
-                       final Component component = get(id);
+                       final Component< ? > component = get(id);
 
                        // Failed to find it?
                        if (component != null)
@@ -1310,7 +1359,7 @@
                        {
                                // 2rd try: Components like Border and Panel 
might implement
                                // the ComponentResolver interface as well.
-                               MarkupContainer container = this;
+                               MarkupContainer< ? > container = this;
                                while (container != null)
                                {
                                        if (container instanceof 
IComponentResolver)
@@ -1325,12 +1374,12 @@
                                }
 
                                // 3rd try: Try application's component 
resolvers
-                               final List componentResolvers = 
getApplication().getPageSettings()
+                               final List<IComponentResolver> 
componentResolvers = getApplication().getPageSettings()
                                        .getComponentResolvers();
-                               final Iterator iterator = 
componentResolvers.iterator();
+                               final Iterator<IComponentResolver> iterator = 
componentResolvers.iterator();
                                while (iterator.hasNext())
                                {
-                                       final IComponentResolver resolver = 
(IComponentResolver)iterator.next();
+                                       final IComponentResolver resolver = 
iterator.next();
                                        if (resolver.resolve(this, 
markupStream, tag))
                                        {
                                                return;
@@ -1379,7 +1428,7 @@
        protected final MarkupStream findMarkupStream()
        {
                // Start here
-               MarkupContainer c = this;
+               MarkupContainer< ? > c = this;
 
                // Walk up hierarchy until markup found
                while (c.getMarkupStream() == null)
@@ -1508,9 +1557,12 @@
                this.markupStream = markupStream;
        }
 
+       /**
+        * 
+        */
        private static class ComponentSourceEntry extends 
org.apache.wicket.ComponentSourceEntry
        {
-               private ComponentSourceEntry(MarkupContainer container, 
Component component,
+               private ComponentSourceEntry(MarkupContainer< ? > container, 
Component< ? > component,
                        IComponentSource componentSource)
                {
                        super(container, component, componentSource);
@@ -1519,12 +1571,16 @@
                private static final long serialVersionUID = 1L;
 
                @Override
-               protected void setChild(MarkupContainer parent, int index, 
Component child)
+               protected void setChild(MarkupContainer< ? > parent, int index, 
Component< ? > child)
                {
                        parent.children_set(index, child, false);
                }
        }
 
+       /**
+        * 
+        * @see org.apache.wicket.Component#detachChildren()
+        */
        @Override
        void detachChildren()
        {
@@ -1535,7 +1591,7 @@
                        Object child = children_get(i, false);
                        if (child instanceof Component)
                        {
-                               Component component = (Component)child;
+                               Component< ? > component = (Component< ? 
>)child;
                                component.detach();
 
                                if (child instanceof IComponentSourceProvider)
@@ -1559,6 +1615,10 @@
                }
        }
 
+       /**
+        * 
+        * @see org.apache.wicket.Component#internalMarkRendering()
+        */
        @Override
        void internalMarkRendering()
        {
@@ -1566,15 +1626,19 @@
                final int size = children_size();
                for (int i = 0; i < size; i++)
                {
-                       final Component child = children_get(i);
+                       final Component< ? > child = children_get(i);
                        child.internalMarkRendering();
                }
        }
 
-       private Component[] copyChildren()
+       /**
+        * 
+        * @return
+        */
+       private Component< ? >[] copyChildren()
        {
                int size = children_size();
-               Component result[] = new Component[size];
+               Component< ? > result[] = new Component[size];
                for (int i = 0; i < size; ++i)
                {
                        result[i] = children_get(i);
@@ -1582,6 +1646,10 @@
                return result;
        }
 
+       /**
+        * 
+        * @see org.apache.wicket.Component#onBeforeRenderChildren()
+        */
        @Override
        void onBeforeRenderChildren()
        {
@@ -1589,14 +1657,14 @@
 
                // We need to copy the children list because the children 
components can
                // modify the hierarchy in their onBeforeRender.
-               Component[] children = copyChildren();
+               Component< ? >[] children = copyChildren();
                try
                {
                        // Loop through child components
                        for (int i = 0; i < children.length; i++)
                        {
                                // Get next child
-                               final Component child = children[i];
+                               final Component< ? > child = children[i];
 
                                // Call begin request on the child
                                // We need to check whether the child's wasn't 
removed from the
@@ -1622,15 +1690,19 @@
                }
        }
 
+       /**
+        * 
+        * @see org.apache.wicket.Component#onAfterRenderChildren()
+        */
        @Override
        void onAfterRenderChildren()
        {
                // Loop through child components
-               final Iterator iter = iterator();
+               final Iterator<Component< ? >> iter = iterator();
                while (iter.hasNext())
                {
                        // Get next child
-                       final Component child = (Component)iter.next();
+                       final Component< ? > child = iter.next();
 
                        // Call end request on the child
                        child.afterRender();
@@ -1654,9 +1726,9 @@
        {
                super.setRenderAllowed();
 
-               visitChildren(new IVisitor()
+               visitChildren(new IVisitor<Component< ? >>()
                {
-                       public Object component(final Component component)
+                       public Object component(final Component< ? > component)
                        {
                                // Find out if this component can be rendered
                                final boolean renderAllowed = 
component.isActionAuthorized(RENDER);
@@ -1667,6 +1739,9 @@
                });
        }
 
+       /**
+        * 
+        */
        private static class ChildList extends AbstractList<Object> implements 
IClusterable
        {
                private static final long serialVersionUID = 
-7861580911447631127L;

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/application/IComponentInstantiationListener.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/application/IComponentInstantiationListener.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/application/IComponentInstantiationListener.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/application/IComponentInstantiationListener.java
 Thu Apr 10 10:20:59 2008
@@ -37,5 +37,5 @@
         * @param component
         *            the component that is being instantiated.
         */
-       void onInstantiation(Component component);
+       void onInstantiation(Component< ? > component);
 }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
 Thu Apr 10 10:20:59 2008
@@ -31,9 +31,7 @@
  */
 public abstract class AbstractBehavior implements IBehavior, IHeaderContributor
 {
-       /**
-        * 
-        */
+       /** */
        private static final long serialVersionUID = 1L;
 
        /**

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/list/ListView.java
 Thu Apr 10 10:20:59 2008
@@ -541,7 +541,7 @@
                        {
                                // Remove all ListItems no longer required
                                final int maxIndex = firstIndex + size;
-                               for (final Iterator<Component> iterator = 
iterator(); iterator.hasNext();)
+                               for (final Iterator<Component< ? >> iterator = 
iterator(); iterator.hasNext();)
                                {
                                        // Get next child component
                                        final ListItem<T> child = 
(ListItem<T>)iterator.next();
@@ -652,11 +652,11 @@
         * @see 
org.apache.wicket.markup.repeater.AbstractRepeater#renderIterator()
         */
        @Override
-       protected Iterator<Component> renderIterator()
+       protected Iterator<Component< ? >> renderIterator()
        {
 
                final int size = size();
-               return new ReadOnlyIterator()
+               return new ReadOnlyIterator<Component< ? >>()
                {
                        private int index = 0;
 
@@ -665,11 +665,11 @@
                                return index < size;
                        }
 
-                       public Object next()
+                       public Component< ? > next()
                        {
                                final String id = Integer.toString(firstIndex + 
index);
                                index++;
-                               Component c = get(id);
+                               Component< ? > c = get(id);
                                return c;
                        }
                };

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
 Thu Apr 10 10:20:59 2008
@@ -78,7 +78,7 @@
         * 
         * @return iterator over child components to be rendered
         */
-       protected abstract Iterator<Component> renderIterator();
+       protected abstract Iterator<Component< ? >> renderIterator();
 
        /**
         * Renders all child items in no specified order
@@ -91,7 +91,7 @@
        {
                final int markupStart = markupStream.getCurrentIndex();
 
-               Iterator<Component> it = renderIterator();
+               Iterator<Component< ? >> it = renderIterator();
                if (it.hasNext())
                {
                        do
@@ -134,7 +134,7 @@
 
                if 
(Application.get().getConfigurationType().equals(Application.DEVELOPMENT))
                {
-                       Iterator<Component> i = iterator();
+                       Iterator<Component< ? >> i = iterator();
                        while (i.hasNext())
                        {
                                Component c = i.next();

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RefreshingView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RefreshingView.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RefreshingView.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RefreshingView.java
 Thu Apr 10 10:20:59 2008
@@ -166,7 +166,7 @@
        {
                return new Iterator<Item<T>>()
                {
-                       private final Iterator<Component> delegate = iterator();
+                       private final Iterator<Component< ? >> delegate = 
iterator();
 
                        public boolean hasNext()
                        {

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/repeater/RepeatingView.java
 Thu Apr 10 10:20:59 2008
@@ -109,7 +109,7 @@
         * @see 
org.apache.wicket.markup.repeater.AbstractRepeater#renderIterator()
         */
        @Override
-       protected Iterator<Component> renderIterator()
+       protected Iterator<Component< ? >> renderIterator()
        {
                return iterator();
        }

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/IComponentAssignedModel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/IComponentAssignedModel.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/IComponentAssignedModel.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/model/IComponentAssignedModel.java
 Thu Apr 10 10:20:59 2008
@@ -44,6 +44,8 @@
  * 
  * @author jcompagner
  * @author Igor Vaynberg (ivaynberg)
+ * @param <T>
+ *            The model data type
  */
 public interface IComponentAssignedModel<T> extends IModel<T>
 {

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/collections/ReadOnlyIterator.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/collections/ReadOnlyIterator.java?rev=646881&r1=646880&r2=646881&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/collections/ReadOnlyIterator.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/collections/ReadOnlyIterator.java
 Thu Apr 10 10:20:59 2008
@@ -23,12 +23,13 @@
  * [EMAIL PROTECTED] UnsupportedOperationException}
  * 
  * @author Igor Vaynberg (ivaynberg)
+ * @param <T>
  */
-public abstract class ReadOnlyIterator implements Iterator
+public abstract class ReadOnlyIterator<T> implements Iterator<T>
 {
        public final void remove()
        {
                throw new UnsupportedOperationException("Iterator " + 
getClass().getName() +
-                               " is a read-only iterator. Calls to remove() 
are not allowed");
+                       " is a read-only iterator. Calls to remove() are not 
allowed");
        }
 }


Reply via email to