net.java.html.json
Class Models

java.lang.Object
  extended by net.java.html.json.Models

public final class Models
extends Object

Information about and operations for classes generated by the @Model annotation.

Author:
Jaroslav Tulach

Method Summary
static boolean isModel(Class<?> clazz)
          Finds out whether given class is a model class - e.g.
static
<M> M
parse(Context c, Class<M> model, InputStream is)
          Generic method to parse content of a model class from a stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isModel

public static boolean isModel(Class<?> clazz)
Finds out whether given class is a model class - e.g. has been generated by @Model annotation.

Parameters:
clazz - the class to test
Returns:
true, if clazz was generated by Model annotation
Since:
0.2

parse

public static <M> M parse(Context c,
                          Class<M> model,
                          InputStream is)
               throws IOException
Generic method to parse content of a model class from a stream.

Parameters:
c - context of the technology to use for reading
model - the model class generated by Model annotation
is - input stream with data
Returns:
new instance of the model class
Throws:
IOException
Since:
0.2


Copyright © 2013 API Design. All Rights Reserved.