Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.sun.jersey.server.impl.inject;
 
 import java.util.List;
A hold of a list of injectable that obtains the injectable values from that list.

Author(s):
Paul.Sandoz@Sun.Com
public class InjectableValuesProvider {
    private final List<AbstractHttpContextInjectableis;

    
Create a new instance given a list of injectable.

Parameters:
is the list of injectable.
    public InjectableValuesProvider(List<Injectableis) {
        this. = AbstractHttpContextInjectable.transform(is);
    }
        return ;
    }

    
Get the injectable values.

Parameters:
context the http contest.
Returns:
the injectable values. Each element in the object array is a value obtained from the injectable at the list index that is the element index.
    public Object[] getInjectableValues(HttpContext context) {
        final Object[] params = new Object[.size()];
        try {
            int index = 0;
            for (AbstractHttpContextInjectable i : ) {
                params[index++] = i.getValue(context);
            }
            return params;
        } catch (WebApplicationException e) {
            throw e;
        } catch (ContainerException e) {
            throw e;
        } catch (RuntimeException e) {
            throw new ContainerException("Exception obtaining parameters"e);
        }
    }
New to GrepCode? Check out our FAQ X