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 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
 Class<T> getRawClass()
           
 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 Type getType()

getRawClass

public Class<T> getRawClass()


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