info.javelot.functionalj.reflect.helper
Interface ReflectParameters

All Known Implementing Classes:
ReflectParametersImpl

public interface ReflectParameters

Interface to define a way to determine compatible reflected elements according to a list of parameters.

Author:
Copyright © 2006 Frederic Daoud

Method Summary
 ReflectElement findCompatible(ReflectElement[] p_elements, Object[] p_params)
          Finds the reflected element that is compatible with the given parameters.
 boolean isPartialApplicationPossible(ReflectElement[] p_elements, Object[] p_params)
          Determines if the given parameters can be partially applied to at least one of the reflected elements.
 

Method Detail

findCompatible

ReflectElement findCompatible(ReflectElement[] p_elements,
                              Object[] p_params)
                              throws FunctionException
Finds the reflected element that is compatible with the given parameters.

Parameters:
p_elements - the elements from which to find the compatible element.
p_params - the parameters with which the element must be compatible.
Returns:
the element that is compatible with the given parameters.
Throws:
FunctionException - thrown if no element is compatible.

isPartialApplicationPossible

boolean isPartialApplicationPossible(ReflectElement[] p_elements,
                                     Object[] p_params)
Determines if the given parameters can be partially applied to at least one of the reflected elements.

Parameters:
p_elements - the possible reflected elements.
p_params - the parameters to be partially applied.
Returns:
true if the given parameters can be partially applied to at least one reflected element, false otherwise.