|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.codehaus.groovy.grails.commons.metaclass.AbstractDynamicProperty
org.codehaus.groovy.grails.commons.metaclass.WeakGenericDynamicProperty
public class WeakGenericDynamicProperty extends AbstractDynamicProperty
A generic dyanmic property for any type used a soft hashmap implementation for generic properties registered as global in the MetaClass.
| Constructor Summary | |
WeakGenericDynamicProperty(java.lang.String propertyName, java.lang.Class type, java.lang.Object initialValue, boolean readOnly)
@param propertyName The name of the property |
|
WeakGenericDynamicProperty(java.lang.String propertyName, java.lang.Class type, boolean readOnly)
@param propertyName The name of the property |
|
WeakGenericDynamicProperty(java.lang.String propertyName, java.lang.Class type, FunctionCallback initialValueGenerator, boolean readOnly)
Variant that allows supply of a lazy-initialization function for the initial value. |
|
| Method Summary | |
|---|---|
java.lang.Object
|
get(java.lang.Object object)
|
void
|
set(java.lang.Object object, java.lang.Object newValue)
|
| Methods inherited from class AbstractDynamicProperty | |
|---|---|
| get, getPropertyName, isPropertyMatch, set |
| Constructor Detail |
|---|
public WeakGenericDynamicProperty(java.lang.String propertyName, java.lang.Class type, java.lang.Object initialValue, boolean readOnly)
propertyName - The name of the propertytype - The type of the propertyinitialValue - The initial value of the propertyreadOnly - True for read-only property
public WeakGenericDynamicProperty(java.lang.String propertyName, java.lang.Class type, boolean readOnly)
propertyName - The name of the propertytype - The type of the propertyreadOnly - True for read-only property
public WeakGenericDynamicProperty(java.lang.String propertyName, java.lang.Class type, FunctionCallback initialValueGenerator, boolean readOnly)
Variant that allows supply of a lazy-initialization function for the initial value.
This function is called only on the first access to the property for a given object, unless the function returns null in which case it will be called again if another request is made.
propertyName - The name of the propertytype - The type of the propertyreadOnly - True for read-only propertyinitialValueGenerator - Callback function which will be called for initial value of property
| Method Detail |
|---|
@Override public java.lang.Object get(java.lang.Object object)
@Override public void set(java.lang.Object object, java.lang.Object newValue)
Groovy Documentation