com.sun.ejb.containers.util
Class MethodMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
com.sun.ejb.containers.util.MethodMap
- All Implemented Interfaces:
- Serializable, Cloneable, Map
public final class MethodMap
- extends HashMap
This is an optimized map for resolving java.lang.reflect.Method objects.
Doing a method lookup, even on an unsynchronized Map, can be an
expensive operation, in many cases taking multiple microseconds.
In most situations this overhead is negligible, but it can be noticeable
when performed in the common path of a local ejb invocation, where our
goal is to be as fast as a raw java method call.
A MethodMap must be created with an existing Map and is immutable after
construction(except for clear()).
It does not support the optional Map operations
put, putAll, and remove. NOTE that these operations could
be implemented but are not necessary at this point since the main use
is for the container's method info, which is invariant after initialization.
As this is a map for Method objects, null keys are not supported.
This map is unsynchronized.
- See Also:
- Serialized Form
MethodMap
public MethodMap(Map methodMap)
MethodMap
public MethodMap(Map methodMap,
int numBuckets)
put
public Object put(Object key,
Object value)
- Specified by:
put in interface Map- Overrides:
put in class HashMap
putAll
public void putAll(Map t)
- Specified by:
putAll in interface Map- Overrides:
putAll in class HashMap
remove
public Object remove(Object key)
- Specified by:
remove in interface Map- Overrides:
remove in class HashMap
get
public Object get(Object key)
- Specified by:
get in interface Map- Overrides:
get in class HashMap
get
public Object get(Method m,
int numParams)
clear
public void clear()
- Specified by:
clear in interface Map- Overrides:
clear in class HashMap
Copyright © 2012 GlassFish Community. All Rights Reserved.