Groovy Documentation

org.codehaus.groovy.grails.commons.metaclass
[Java] Interface DynamicProperty


public interface DynamicProperty

A Dynamic class property getter interface.

Authors:
Graeme Rocher


Method Summary
java.lang.Object get(java.lang.Object object)

Call the getter on the given object

java.lang.String getPropertyName()

@return The name of the property

boolean isPropertyMatch(java.lang.String propertyName)

Whether the target class contains the specified property

void set(java.lang.Object object, java.lang.Object newValue)

Call the setter on the given object

 

Method Detail

get

public java.lang.Object get(java.lang.Object object)
Call the getter on the given object
Parameters:
object - The target object
Returns:
The result of the getter


getPropertyName

public java.lang.String getPropertyName()
Returns:
The name of the property


isPropertyMatch

public boolean isPropertyMatch(java.lang.String propertyName)
Whether the target class contains the specified property
Parameters:
propertyName - The name of the property
Returns:
True if the class has the property


set

public void set(java.lang.Object object, java.lang.Object newValue)
Call the setter on the given object
Parameters:
object - The target object
newValue - The new value of the property


 

Groovy Documentation