|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.javelot.functionalj.reflect.impl.StdReflectImpl
public class StdReflectImpl
A base for implementating "standard" reflection that abstracts how to find methods and constructors, and how to produce functions that invoke them.
| Constructor Summary | |
|---|---|
StdReflectImpl()
Default constructor, which leaves the helper mechanisms unspecified. |
|
StdReflectImpl(ReflectFinder p_finder,
ReflectFactory p_factory)
Constructor that accepts the mechanisms used for reflection. |
|
| Method Summary | |
|---|---|
FunctionN |
constructor(Class p_class,
Class... p_types)
Produces a function that creates an instance of the specified class, using the constructor that accepts parameters of the given types. |
FunctionN |
constructor(String p_class,
Class... p_types)
Version of StdReflect.constructor(Class,Class...) that accepts a String to
specify the class by name. |
FunctionN |
instanceFunction(Class p_class,
String p_name,
Class... p_types)
Produces a function that invokes the instance method of specified class which has the specified name and accepts parameters of the given types. |
FunctionN |
instanceFunction(Object p_object,
String p_name,
Class... p_types)
Produces a function that invokes the instance method on the provided object which has the specified name and accepts parameters of the given types. |
FunctionN |
instanceFunction(String p_class,
String p_name,
Class... p_types)
Version of StdReflect.instanceFunction(Class,String,Class...) that accepts a
String to specify the class by name. |
void |
setReflectFactory(ReflectFactory p_factory)
Sets the mechanism to use for producing a method or constructor invoker. |
void |
setReflectFinder(ReflectFinder p_finder)
Sets the mechanism to use for finding methods and constructors. |
FunctionN |
staticFunction(Class p_class,
String p_name,
Class... p_types)
Produces a function that invokes the static method of specified class which has the specified name and accepts parameters of the given types. |
FunctionN |
staticFunction(String p_class,
String p_name,
Class... p_types)
Version of StdReflect.staticFunction(Class,String,Class...) that accepts a
String to specify the class by name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StdReflectImpl()
The mechanisms to use for finding methods and constructors
(ReflectFinder) and for
producing a method or constructor invoker (ReflectFactory) are left unspecified
when this default constructor is used. Therefore, they must be specified using
the appropriate setters: setReflectFinder(info.javelot.functionalj.reflect.helper.ReflectFinder) and setReflectFactory(info.javelot.functionalj.reflect.helper.ReflectFactory).
public StdReflectImpl(ReflectFinder p_finder,
ReflectFactory p_factory)
p_finder - the mechanism used for finding methods and constructors.p_factory - the mechanism used for producing a method or constructor
invoker.| Method Detail |
|---|
public void setReflectFinder(ReflectFinder p_finder)
public void setReflectFactory(ReflectFactory p_factory)
public FunctionN constructor(Class p_class,
Class... p_types)
throws FunctionException
StdReflect
constructor in interface StdReflectp_class - an instance of this class will be created by the function.p_types - the number and types of the parameters to the constructor.
FunctionException - thrown if a matching constructor was not found.
public FunctionN constructor(String p_class,
Class... p_types)
throws FunctionException
StdReflectStdReflect.constructor(Class,Class...) that accepts a String to
specify the class by name.
constructor in interface StdReflectFunctionException
public FunctionN instanceFunction(Class p_class,
String p_name,
Class... p_types)
throws FunctionException
StdReflect
instanceFunction in interface StdReflectp_class - the class which contains the instance method to be invoked by
the produced function.p_name - the name of the method.p_types - the number and types of the parameters to the instance method.
FunctionException - thrown if a matching instance method was not
found.
public FunctionN instanceFunction(String p_class,
String p_name,
Class... p_types)
throws FunctionException
StdReflectStdReflect.instanceFunction(Class,String,Class...) that accepts a
String to specify the class by name.
instanceFunction in interface StdReflectFunctionException
public FunctionN instanceFunction(Object p_object,
String p_name,
Class... p_types)
throws FunctionException
StdReflect
instanceFunction in interface StdReflectp_object - the object on which the instance method will be invoked by the
produced function.p_name - the name of the method.p_types - the number and types of the parameters to the instance method.
FunctionException - thrown if a matching instance method was not
found.
public FunctionN staticFunction(Class p_class,
String p_name,
Class... p_types)
throws FunctionException
StdReflect
staticFunction in interface StdReflectp_class - the class which contains the static method to be invoked by the
produced function.p_name - the name of the method.p_types - the number and types of the parameters to the static method.
FunctionException - thrown if a matching static method was not found.
public FunctionN staticFunction(String p_class,
String p_name,
Class... p_types)
throws FunctionException
StdReflectStdReflect.staticFunction(Class,String,Class...) that accepts a
String to specify the class by name.
staticFunction in interface StdReflectFunctionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||