|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.Functor<R>
net.sf.jga.fn.Generator<R>
net.sf.jga.fn.property.ConstructDefault<R>
public class ConstructDefault<R>
Generator that constructs an object of the given class using its default constructor.
Copyright © 2004-2005 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
ConstructDefault.Visitor
Interface for classes that may interpret a ConstructDefault functor. |
| Constructor Summary | |
|---|---|
ConstructDefault(java.lang.Class<R> ctorclass)
Builds a generator that will return instances of the class ctorclass, built using the default constructor. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(ConstructDefault) method, if it
implements the nested Visitor interface. |
R |
fn()
Builds an object via the default constructor |
java.lang.reflect.Constructor<R> |
getConstructor()
Lazily loads the constructor |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.Generator |
|---|
bind0th, bindNth, eval |
| Methods inherited from class net.sf.jga.fn.Functor |
|---|
composeNth, composeNth, generateNth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstructDefault(java.lang.Class<R> ctorclass)
ctorclass, built using the default constructor.
java.lang.IllegalArgumentException - if the constructor cannot be found
java.lang.IllegalArgumentException - if the class argument is omitted or does not
define an accessible default constructor.| Method Detail |
|---|
public java.lang.reflect.Constructor<R> getConstructor()
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodExceptionpublic R fn()
fn in class Generator<R>public void accept(Visitor v)
visit(ConstructDefault) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class Functor<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 | ||||||||