Package 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Object
get(Object key)
Object
get(Method m, int numParams)
Object
put(Object key, Object value)
void
putAll(Map t)
Object
remove(Object key)
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-