Class ThreadManagedMetaBeanProperty
java.lang.Object
groovy.lang.MetaProperty
groovy.lang.MetaBeanProperty
org.codehaus.groovy.runtime.metaclass.ThreadManagedMetaBeanProperty
- All Implemented Interfaces:
- MetaMember
This MetaBeanProperty will create a pseudo property whose value is bound to an object
 using weak references. The values will go out of scope and be garbage collected when
 the object is collected
 In fact, this class should be called ExpandoProperty.
- Since:
- 1.5
- 
Field SummaryFields inherited from class groovy.lang.MetaPropertyname, PROPERTY_SET_PREFIX, type
- 
Constructor SummaryConstructorsConstructorDescriptionThreadManagedMetaBeanProperty(Class declaringClass, String name, Class type, Closure initialValueCreator) Constructs a new ThreadManagedBeanProperty for the given argumentsThreadManagedMetaBeanProperty(Class declaringClass, String name, Class type, Object iv) Constructs a new ThreadManagedBeanProperty for the given arguments
- 
Method SummaryModifier and TypeMethodDescriptionGets the getter method of this property.Retrieves the initial value of the ThreadBound propertygetInitialValue(Object object) Gets the setter method of this property.voidsetInitialValueCreator(Closure callable) Closure responsible for creating the initial value of thread-managed bean propertiesMethods inherited from class groovy.lang.MetaBeanPropertygetField, getModifiers, getProperty, setField, setPropertyMethods inherited from class groovy.lang.MetaPropertygetGetterName, getName, getSetterName, getTypeMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface groovy.lang.MetaMemberisFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic
- 
Constructor Details- 
ThreadManagedMetaBeanPropertyConstructs a new ThreadManagedBeanProperty for the given arguments- Parameters:
- declaringClass- The class that declares the property
- name- The name of the property
- type- The type of the property
- iv- The properties initial value
 
- 
ThreadManagedMetaBeanPropertypublic ThreadManagedMetaBeanProperty(Class declaringClass, String name, Class type, Closure initialValueCreator) Constructs a new ThreadManagedBeanProperty for the given arguments- Parameters:
- declaringClass- The class that declares the property
- name- The name of the property
- type- The type of the property
- initialValueCreator- The closure responsible for creating the initial value
 
 
- 
- 
Method Details- 
getInitialValueRetrieves the initial value of the ThreadBound property- Returns:
- The initial value
 
- 
getInitialValue
- 
setInitialValueCreatorClosure responsible for creating the initial value of thread-managed bean properties- Parameters:
- callable- The closure responsible for creating the initial value
 
- 
getGetterDescription copied from class:MetaBeanPropertyGets the getter method of this property.- Overrides:
- getGetterin class- MetaBeanProperty
 
- 
getSetterDescription copied from class:MetaBeanPropertyGets the setter method of this property.- Overrides:
- getSetterin class- MetaBeanProperty
 
 
-