uk.co.ribot.easyadapter.annotations
Class FieldAnnotationParser

java.lang.Object
  extended by uk.co.ribot.easyadapter.annotations.FieldAnnotationParser

public class FieldAnnotationParser
extends Object


Constructor Summary
FieldAnnotationParser()
           
 
Method Summary
static void setViewFields(Object object, Activity activity)
          Parse ViewId annotation and try to assign the view with that id to the annotated field.
static void setViewFields(Object object, View view)
          Parse ViewId annotation and try to assign the view with that id to the annotated field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldAnnotationParser

public FieldAnnotationParser()
Method Detail

setViewFields

public static void setViewFields(Object object,
                                 View view)
Parse ViewId annotation and try to assign the view with that id to the annotated field. It will throw a ClassCastException if the field and the view with the given ID have different types.

Parameters:
object - object where the annotation is.
view - parent view that contains a view with the viewId given in the annotation.

setViewFields

public static void setViewFields(Object object,
                                 Activity activity)
Parse ViewId annotation and try to assign the view with that id to the annotated field. It will throw a ClassCastException if the field and the view with the given ID have different types.

Parameters:
object - object where the annotation is.
activity - activity that contains a view with the viewId given in the annotation.