org.picocontainer.web
Class IntFromRequest
java.lang.Object
org.picocontainer.injectors.ProviderAdapter
org.picocontainer.web.StringFromRequest
org.picocontainer.web.IntFromRequest
- All Implemented Interfaces:
- org.picocontainer.ComponentAdapter, org.picocontainer.Injector, org.picocontainer.injectors.Provider
public class IntFromRequest
- extends StringFromRequest
Use this to make a request level component that pulls an integer from a named parameter (GET or POST)
of the request. If a parameter of the supplied name is not available for the current
request path, then an exception will be thrown. An exception will also be thrown, if the number format is bad.
| Nested classes/interfaces inherited from interface org.picocontainer.ComponentAdapter |
org.picocontainer.ComponentAdapter.NOTHING |
| Methods inherited from class org.picocontainer.injectors.ProviderAdapter |
accept, decorateComponentInstance, findAdapterOfType, getComponentInstance, getComponentInstance, getDelegate, getDescriptor, getProvideMethod, useNames, verify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntFromRequest
public IntFromRequest(String paramName)
getComponentImplementation
public Class getComponentImplementation()
- Specified by:
getComponentImplementation in interface org.picocontainer.ComponentAdapter- Overrides:
getComponentImplementation in class StringFromRequest
provide
public Object provide(javax.servlet.http.HttpServletRequest req)
- Overrides:
provide in class StringFromRequest
addIntegerRequestParameters
public static void addIntegerRequestParameters(org.picocontainer.MutablePicoContainer toContainer,
String... names)
- Add a number of IntFromRequest adapters to a container.
- Parameters:
toContainer - the container to add tonames - the list of names to make adapters from
Copyright © 2009. All Rights Reserved.