|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.UnaryFunctor<java.lang.Object[],R>
net.sf.jga.fn.property.Construct<R>
public class Construct<R>
Unary Functor that constructs an object of the given class. The functor argument is an array containing the arguments to the class' constructor.
Copyright © 2003 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
Construct.Visitor
Interface for classes that may interpret a Construct predicate. |
| Constructor Summary | |
|---|---|
Construct(java.lang.Class[] argclasses,
java.lang.Class<R> ctorclass)
Builds a functor that will build an object of class ctorclass, given arguments of classes in
argclasses. |
|
Construct(java.lang.reflect.Constructor<R> ctor)
Builds a functor that will build an object using the given constructor. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(Construct) method, if it
implements the nested Visitor interface. |
R |
fn(java.lang.Object[] args)
Builds an object via the designated constructor, passing the given array of argument values. |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.UnaryFunctor |
|---|
bind, compose, compose, generate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Construct(java.lang.Class[] argclasses,
java.lang.Class<R> ctorclass)
ctorclass, given arguments of classes in
argclasses.
java.lang.IllegalArgumentException - if either argument is omitted, or if the
constructor cannot be found.public Construct(java.lang.reflect.Constructor<R> ctor)
java.lang.IllegalArgumentException - if the constructor is omitted.| Method Detail |
|---|
public R fn(java.lang.Object[] args)
fn in class UnaryFunctor<java.lang.Object[],R>public void accept(Visitor v)
visit(Construct) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class UnaryFunctor<java.lang.Object[],R>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||