info.javelot.functionalj.reflect.helper.impl
Class ReflectParametersImpl
java.lang.Object
info.javelot.functionalj.reflect.helper.impl.ReflectParametersImpl
- All Implemented Interfaces:
- ReflectParameters
public class ReflectParametersImpl
- extends Object
- implements ReflectParameters
Implementation of a way to find the reflection elements that are compatible with a
list of parameters.
- Author:
- Copyright © 2006
Frederic Daoud
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReflectParametersImpl
public ReflectParametersImpl()
findCompatible
public ReflectElement findCompatible(ReflectElement[] p_elements,
Object[] p_params)
throws FunctionException
- Description copied from interface:
ReflectParameters
- Finds the reflected element that is compatible with the given parameters.
- Specified by:
findCompatible
in interface ReflectParameters
- 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
public boolean isPartialApplicationPossible(ReflectElement[] p_elements,
Object[] p_params)
- Description copied from interface:
ReflectParameters
- Determines if the given parameters can be partially applied
to at least one of the reflected elements.
- Specified by:
isPartialApplicationPossible
in interface ReflectParameters
- 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.