Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * The contents of this file are subject to the terms
  * of the Common Development and Distribution License
  * (the "License").  You may not use this file except
  * in compliance with the License.
  * You can obtain a copy of the license at
  * See the License for the specific language governing
 * permissions and limitations under the License.

Contract for a provider that supplies context information to resource classes and other providers. An implementation of this interface must be annotated with Provider. A ContextResolver implementation may be annotated with to restrict the media types for which it will be considered suitable.

public interface ContextResolver<T> {

Get a context of type T that is applicable to the supplied type.

type the class of object for which a context is desired
a context for the supplied type or null if a context for the supplied type is not available from this provider.
    T getContext(Class<?> type);
New to GrepCode? Check out our FAQ X