org.apache.velocity.util.introspection
Class MethodMap
java.lang.Object
org.apache.velocity.util.introspection.MethodMap
public class MethodMap
extends java.lang.Object
Version:
- Jason van Zyl
- Bob McWhirter
- Christoph Reck
- Geir Magnusson Jr.
protected static Object | OBJECT
|
(package private) Map | methodByNameMap - Keep track of all methods with the same name.
|
void | add(Method method) - Add a method to a list of methods by name.
|
private MethodMap.Twonk | calcDistance(Object[] set, Class[] base) - Calculates the distance, expressed as a vector of inheritance
steps, between the calling args and the method args.
|
private boolean | checkPrimitive(Class formal, Class arg) - check for primitive and widening.
|
Method | find(String methodName, Object[] params) -
Find a method.
|
List | get(String key) - Return a list of methods with the same name.
|
OBJECT
protected static final Object OBJECT
methodByNameMap
(package private) Map methodByNameMap
Keep track of all methods with the same name.
add
public void add(Method method)
Add a method to a list of methods by name.
For a particular class we are keeping track
of all the methods with the same name.
calcDistance
private MethodMap.Twonk calcDistance(Object[] set,
Class[] base)
Calculates the distance, expressed as a vector of inheritance
steps, between the calling args and the method args.
There still is an issue re interfaces...
checkPrimitive
private boolean checkPrimitive(Class formal,
Class arg)
check for primitive and widening. Take from the 1.4 code
find
public Method find(String methodName,
Object[] params)
throws MethodMap.AmbiguousException
Find a method. Attempts to find the
most appropriate method using the
sense of 'specificity'.
This turns out to be a relatively rare case
where this is needed - however, functionality
like this is needed. This may not be the
optimum approach, but it works.
- Method
get
public List get(String key)
Return a list of methods with the same name.
- List list of methods
Copyright © 2003 Apache Software Foundation. All Rights Reserved.