Java Code Examples for org.immutables.gson.Gson#ExpectedSubtypes

The following examples show how to use org.immutables.gson.Gson#ExpectedSubtypes . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Polymorphics.java    From immutables with Apache License 2.0 4 votes vote down vote up
@Gson.ExpectedSubtypes({B.class, C.class, D.class})
List<A> list();
 
Example 2
Source File: Polymorphics.java    From immutables with Apache License 2.0 4 votes vote down vote up
@Gson.ExpectedSubtypes({})
Map<String, A> autodetect();
 
Example 3
Source File: Optionals.java    From immutables with Apache License 2.0 4 votes vote down vote up
@Gson.ExpectedSubtypes({B.class, C.class, D.class})
Optional<A> aPoly();
 
Example 4
Source File: SillyPolyHost2.java    From immutables with Apache License 2.0 4 votes vote down vote up
@Gson.ExpectedSubtypes({
    SillySub2.class,
    SillySub3.class
})
public abstract SillyAbstract s();
 
Example 5
Source File: SillyPolyHost2.java    From immutables with Apache License 2.0 4 votes vote down vote up
@Gson.ExpectedSubtypes({
    SillySub2.class,
    SillySub3.class
})
public abstract Optional<SillyAbstract> o();