| net.sf.jga.fn.property.ConstructUnary
ConstructUnary | public class ConstructUnary extends UnaryFunctor (Code) | | Unary Functor that constructs an object of the given class via a
one-argument constructor.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | ConstructUnary(Class<T> argclass, Class<R> ctorclass) Builds a functor that will build an object of class
ctorclass , given an argument of class argclass . |
serialVersionUID | final static long serialVersionUID(Code) | | |
ConstructUnary | public ConstructUnary(Class<T> argclass, Class<R> ctorclass)(Code) | | Builds a functor that will build an object of class
ctorclass , given an argument of class argclass .
The classes passed to the constructor must be assignable to the generic
arguments (when generics are in use):
ConstructUnary ctor =
new ConstructUnary(String.class,Integer.class);
throws: IllegalArgumentException - if either argument is omitted, or if theconstructor cannot be found. |
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(ConstructUnary) method, if it
implements the nested Visitor interface.
|
fn | public R fn(T arg)(Code) | | Builds an object via a one-arg constructor, passing the given value.
the object built by the constructor |
|
|