| net.sf.jga.fn.property.SetField
SetField | public class SetField extends BinaryFunctor (Code) | | Binary Functor that sets the named field of the first argument to the
value. The field name and type are set at construction. The return
value will be null.
Note that declaring the return type incorrectly can result in
ClassCastExceptions being thrown when the functor is invoked: the compiler
cannot check the return type of a reflectively loaded field.
Copyright © 2002-2005 David A. Hall
author: David A. Hall |
Method Summary | |
public void | accept(net.sf.jga.fn.Visitor v) Calls the Visitor's visit(etField) field, if it
implements the nested Visitor interface. | public R | fn(T arg, R val) Sets the designated field of the argument to the given value and returns
null.
null throws: EvaluationException - if the argument does not have the designatedpublic field, or if it is accept the given value. | public String | getFieldName() Returns the name of the field that this functor sets. | public String | toString() |
serialVersionUID | final static long serialVersionUID(Code) | | |
SetField | public SetField(Field field)(Code) | | Builds a SetField that will update the value of the given field
throws: IllegalArgumentException - if either argument is omitted, or ifthere is no such setter field in type argType. |
SetField | public SetField(Class<T> argType, Field field)(Code) | | Builds a SetField that will update the value of the given field
throws: IllegalArgumentException - if either argument is omitted, or ifthere is no such setter field in type argType. |
SetField | public SetField(Class<T> argType, Field field, Class<R> fieldType)(Code) | | Builds a SetField that will update the value of the given field
throws: IllegalArgumentException - if either argument is omitted, or ifthere is no such setter field in type argType. |
SetField | public SetField(Class<T> argType, String fieldName, Class<R> fieldType)(Code) | | Builds a SetField that will update the value of the named field
of an instance of type argType. The field will be of type propType.
throws: IllegalArgumentException - if either argument is omitted, or ifthere is no such setter field in type argType. |
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(etField) field, if it
implements the nested Visitor interface.
|
fn | public R fn(T arg, R val)(Code) | | Sets the designated field of the argument to the given value and returns
null.
null throws: EvaluationException - if the argument does not have the designatedpublic field, or if it is accept the given value. |
getFieldName | public String getFieldName()(Code) | | Returns the name of the field that this functor sets.
|
|
|