org.coinjema.util
Class ConstructorFunctor<T>
java.lang.Object
org.coinjema.util.ConstructorFunctor<T>
- All Implemented Interfaces:
- Invokable<T>, InvokableWith<T>
public class ConstructorFunctor<T>
- extends Object
- implements InvokableWith<T>, Invokable<T>
A functor that represents a constructor.
- Author:
- mstover
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstructorFunctor
public ConstructorFunctor(Class<? extends T> clazz)
- Parameters:
clazz
-
ConstructorFunctor
public ConstructorFunctor(Class<? extends T> clazz,
Class<?>... types)
- Parameters:
clazz
- types
-
ConstructorFunctor
public ConstructorFunctor(Class<? extends T> clazz,
Class<?>[] types,
Object[] args)
- Parameters:
clazz
- types
- args
-
invoke
public T invoke()
- Specified by:
invoke
in interface Invokable<T>
- Returns:
invokeWith
public T invokeWith(Object... args)
- Specified by:
invokeWith
in interface InvokableWith<T>
- Parameters:
args
-
- Returns:
createConstructor
public Constructor<? extends T> createConstructor(Class<?>[] types)
throws Exception
- Parameters:
types
-
- Returns:
-
- Throws:
Exception
Public Domain Software.