org.apache.wink.client
Class EntityType<T>

java.lang.Object
  extended by org.apache.wink.client.EntityType<T>
Type Parameters:
T - the entity type

public class EntityType<T>
extends java.lang.Object

The EntityType is used to specify the class type and the generic type of responses.

Typically, an anonymous EntityType instance is created in order to specify the response type, like so:

 Resource resource = client.resource(uri);
 List<String> list = resource.get(new EntityType<List<String>>() {
 });
 


Constructor Summary
protected EntityType()
          Construct a new entity type.
 
Method Summary
 java.lang.Class<T> getRawClass()
           
 java.lang.reflect.Type getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityType

protected EntityType()
Construct a new entity type. The constructor is protected to force extension of this class, in order to enable the extraction of the generic type and the class type from the superclass.

Throws:
ClientRuntimeException - if there are exceptions generating the type information, most notably if the derived type is not parameterized
Method Detail

getType

public java.lang.reflect.Type getType()

getRawClass

public java.lang.Class<T> getRawClass()


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.