Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jersey.spi
Interface StringReaderProvider<T>

Type Parameters:
  `T` - The Java type.

    public interface StringReaderProvider<T>

Contract for a provider that supports the conversion of a string to a Java type. To add a `StringReaderProvider` implementation, annotate the implementation class with `Provider`.

Such providers will be used when converting a String value to a java type annotated by the *Param annotations such as `QueryParam`.

Author:
  Paul.Sandoz@Sun.Com
See Also:
  `Provider`, `StringReaderWorkers`

Method Summary
`StringReader<T>` | `getStringReader(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)` Obtain a StringReader that can produce an instance of a particular type from a string.

Method Detail

### getStringReader

    StringReader<T> getStringReader(java.lang.Class<?> type,
                                    java.lang.reflect.Type genericType,
                                    java.lang.annotation.Annotation[] annotations)

  Obtain a StringReader that can produce an instance of a particular type from a string.

  Parameters:
    `type` - the class of object to be produced.
    `genericType` - the type of object to be produced. E.g. if the string is to be converted into a method parameter, this will be the formal type of the method parameter as returned by `Class.getGenericParameterTypes`.
    `annotations` - an array of the annotations on the declaration of the artifact that will be initialized with the produced instance. E.g. if the string is to be converted into a method parameter, this will be the annotations on that parameter returned by `Class.getParameterAnnotations`.
  Returns:
    the string reader, otherwise null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 Oracle Corporation. All Rights Reserved.