org.picocontainer.web
Class StringFromRequest
java.lang.Object
org.picocontainer.injectors.ProviderAdapter
org.picocontainer.web.StringFromRequest
- All Implemented Interfaces:
- org.picocontainer.ComponentAdapter, org.picocontainer.Injector, org.picocontainer.injectors.Provider
- Direct Known Subclasses:
- IntFromRequest
public class StringFromRequest
- extends org.picocontainer.injectors.ProviderAdapter
Use this to make a request level component that pulls an string 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.
| 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 |
StringFromRequest
public StringFromRequest(String paramName)
getComponentImplementation
public Class getComponentImplementation()
- Specified by:
getComponentImplementation in interface org.picocontainer.ComponentAdapter- Overrides:
getComponentImplementation in class org.picocontainer.injectors.ProviderAdapter
getComponentKey
public Object getComponentKey()
- Specified by:
getComponentKey in interface org.picocontainer.ComponentAdapter- Overrides:
getComponentKey in class org.picocontainer.injectors.ProviderAdapter
provide
public Object provide(javax.servlet.http.HttpServletRequest req)
addStringRequestParameters
public static void addStringRequestParameters(org.picocontainer.MutablePicoContainer toContainer,
String... names)
- Add a number of StringFromRequest adapters to a container.
- Parameters:
toContainer - the container to add tonames - the list of names to make adapters from
Copyright © 2009. All Rights Reserved.