AeroGear Android Library 1.1.0

org.jboss.aerogear.android.impl.reflection
Class Property

java.lang.Object
  extended by org.jboss.aerogear.android.impl.reflection.Property

public class Property
extends Object

Helper to access property with reflection


Constructor Summary
Property(Class klass, String fieldName)
          Constructor to access field with get/set
 
Method Summary
 String getFieldName()
           
 Object getValue(Object instance)
          Get value
 void setValue(Object instance, Object value)
          Set new value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Property

public Property(Class klass,
                String fieldName)
Constructor to access field with get/set

Parameters:
klass - Class to be manipulated
fieldName - Field to be accessed
Throws:
IllegalArgumentException - if either param is null
PropertyNotFoundException - if property isn't found
Method Detail

getValue

public Object getValue(Object instance)
Get value

Parameters:
instance - Instance to get value
Returns:
Value

setValue

public void setValue(Object instance,
                     Object value)
Set new value

Parameters:
instance - Instance to set new value
value - new value

getFieldName

public String getFieldName()

AeroGear Android Library 1.1.0

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.