Package org.jboss.resteasy.core
Class AbstractCollectionFormInjector<T>
java.lang.Object
org.jboss.resteasy.core.FormInjector
org.jboss.resteasy.core.PrefixedFormInjector
org.jboss.resteasy.core.AbstractCollectionFormInjector<T>
- Type Parameters:
T- The type of collection that will be created.
- All Implemented Interfaces:
ValueInjector
- Direct Known Subclasses:
ListFormInjector,MapFormInjector
Abstract implementation of
that can inject collections.
invalid reference
NestedFormInjector
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCollectionFormInjector(Class collectionType, Class genericType, String prefix, Pattern pattern, ResteasyProviderFactory factory) Creates an injector to inject a collection. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidAdds the item to the collection.protected abstract TcreateInstance(Class collectionType) Creates an instance of the collection type.inject(HttpRequest request, HttpResponse response) Inject inside the context of an HTTP request.Methods inherited from class org.jboss.resteasy.core.PrefixedFormInjector
doInject, hasValueMethods inherited from class org.jboss.resteasy.core.FormInjector
inject
-
Constructor Details
-
AbstractCollectionFormInjector
protected AbstractCollectionFormInjector(Class collectionType, Class genericType, String prefix, Pattern pattern, ResteasyProviderFactory factory) Creates an injector to inject a collection.- Parameters:
collectionType- The type of collection to return.genericType- The type of elements in the collection.pattern- The pattern that a field name should follow to be a part of this collection. The first group in the pattern must be the index.
-
-
Method Details
-
inject
Inject inside the context of an HTTP request. Wraps the request in a Creates a collection instance and fills it with content by using the super implementation.- Specified by:
injectin interfaceValueInjector- Overrides:
injectin classPrefixedFormInjector- Parameters:
request-response-- Returns:
-
createInstance
Creates an instance of the collection type. -
addTo
Adds the item to the collection.
-