Groovy Documentation

## groovy.model
[Java] Class ClosureModel

    java.lang.Object
      groovy.model.ClosureModel

All Implemented Interfaces:
  NestedValueModel, ValueModel

    public class ClosureModel

Represents a value model using a closure to extract the value from some source model and an optional write closure for updating the value.

Authors:
  James Strachan

Version:
  \$Revision\$

Constructor Summary
`ClosureModel(ValueModel sourceModel, Closure readClosure)`
`ClosureModel(ValueModel sourceModel, Closure readClosure, Closure writeClosure)`
`ClosureModel(ValueModel sourceModel, Closure readClosure, Closure writeClosure, java.lang.Class type)`

Method Summary
`ValueModel` | `getSourceModel()`
`java.lang.Class` | `getType()`
`java.lang.Object` | `getValue()`
`boolean` | `isEditable()`
`void` | `setValue(java.lang.Object value)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### ClosureModel

    public ClosureModel(ValueModel sourceModel, Closure readClosure)

### ClosureModel

    public ClosureModel(ValueModel sourceModel, Closure readClosure, Closure writeClosure)

### ClosureModel

    public ClosureModel(ValueModel sourceModel, Closure readClosure, Closure writeClosure, java.lang.Class type)

Method Detail

### getSourceModel

    public ValueModel getSourceModel()

### getType

    public java.lang.Class getType()

### getValue

    public java.lang.Object getValue()

### isEditable

    public boolean isEditable()

### setValue

    public void setValue(java.lang.Object value)

Groovy Documentation