@Documented @Retention(value=RUNTIME) @Target(value=TYPE) public @interface MapUpTo
Suppose you have the following class hirarchy:
class Creature {}
class Animal extends Creature {}
class Mammal extends Animal {}
@MapUpTo(Animal.class)
class Dog extends Mammal
{
interface DogReader extends JsonReader<Dog> {}
static final DogReader JSON = GWT.create(DogReader.class);
}
class Application implements EntryPoint
{
public void onModuleLoad()
{
String json = ...;
Dog dog = Dog.JSON.read(json);
}
}
Then properties in Creature won't be processed.public abstract Class<?> value
Copyright © 2013 Harald Pehl. All Rights Reserved.