net.sf.doolin.gui.model
Class MethodDataFactory<V>

java.lang.Object
  extended by net.sf.doolin.gui.model.MethodDataFactory<V>
Type Parameters:
V - Type of the model
All Implemented Interfaces:
DataFactory<V>

public class MethodDataFactory<V>
extends Object
implements DataFactory<V>

Calls a method on a property of the context in order to get the result. By default, the property is set to "this" so the method is called directly on the context.

Author:
Damien Coraboeuf

Constructor Summary
MethodDataFactory()
           
 
Method Summary
 V create(Object context)
          Creates an arbitrary object.
 void setMethodName(String methodName)
          Sets the method to call on the context
 void setPropertyPath(String propertyPath)
          Sets the Path to the bean to call the method on
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodDataFactory

public MethodDataFactory()
Method Detail

create

public V create(Object context)
Description copied from interface: DataFactory
Creates an arbitrary object.

Specified by:
create in interface DataFactory<V>
Parameters:
context - Context of creation
Returns:
Created object.

setPropertyPath

public void setPropertyPath(String propertyPath)
Sets the Path to the bean to call the method on

Parameters:
propertyPath - Path to the bean to call the method on

setMethodName

public void setMethodName(String methodName)
Sets the method to call on the context

Parameters:
methodName - Method name


Copyright © 2011. All Rights Reserved.