Class ClassMap
java.lang.Object
org.apache.maven.model.interpolation.reflection.ClassMap
Deprecated.
A cache of introspection information for a specific class instance.
Keys
Method objects by a concatenation of the
method name and the names of classes that make up the parameters.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classDeprecated.private static final classDeprecated.Used for the iterative discovery process for public methods. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ClassMap.CacheMissDeprecated.private final Class<?> Deprecated.Class passed into the constructor used to as the basis for the Method map.Deprecated.Cache of Methods, or CACHE_MISS, keyed by method name and actual arguments used to find it.private MethodMapDeprecated.private static final ObjectDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindMethod(String name, Object... params) Deprecated.Find a Method using the methodKey provided.private static Method[]getAccessibleMethods(Class<?> clazz) Deprecated.Retrieves public methods for a class.private static intgetAccessibleMethods(Class<?> clazz, ClassMap.MethodInfo[] methodInfos, int upcastCount) Deprecated.Recursively finds a match for each method, starting with the class, and then searching the superclass and interfaces.(package private) Class<?> Deprecated.private static MethodgetPublicMethod(Class<?> clazz, String name, Class<?>... paramTypes) Deprecated.Looks up the method with specified name and signature in the first public superclass or implemented interface of the class.private static MethodgetPublicMethod(Method method) Deprecated.For a given method, retrieves its publicly accessible counterpart.private StringmakeMethodKey(Method method) Deprecated.Make a methodKey for the given method using the concatenation of the name and the types of the method parameters.private static StringmakeMethodKey(String method, Object... params) Deprecated.private voidDeprecated.Populate the Map of direct hits.
-
Field Details
-
CACHE_MISS
Deprecated. -
OBJECT
Deprecated. -
clazz
Deprecated.Class passed into the constructor used to as the basis for the Method map. -
methodCache
Deprecated.Cache of Methods, or CACHE_MISS, keyed by method name and actual arguments used to find it. -
methodMap
Deprecated.
-
-
Constructor Details
-
ClassMap
ClassMap(Class<?> clazz) Deprecated.Standard constructor- Parameters:
clazz- The class.
-
-
Method Details
-
getCachedClass
Class<?> getCachedClass()Deprecated.- Returns:
- the class object whose methods are cached by this map.
-
findMethod
Deprecated.Find a Method using the methodKey provided.
Look in the methodMap for an entry. If found, it'll either be a CACHE_MISS, in which case we simply give up, or it'll be a Method, in which case, we return it.
If nothing is found, then we must actually go and introspect the method from the MethodMap.
- Parameters:
name- Method name.params- Method parameters.- Returns:
- The found method.
- Throws:
MethodMap.AmbiguousException- in case of duplicate methods.
-
populateMethodCache
private void populateMethodCache()Deprecated.Populate the Map of direct hits. These are taken from all the public methods that our class provides. -
makeMethodKey
Deprecated.Make a methodKey for the given method using the concatenation of the name and the types of the method parameters. -
makeMethodKey
Deprecated. -
getAccessibleMethods
Deprecated.Retrieves public methods for a class. In case the class is not public, retrieves methods with same signature as its public methods from public superclasses and interfaces (if they exist). Basically upcasts every method to the nearest acccessible method. -
getAccessibleMethods
private static int getAccessibleMethods(Class<?> clazz, ClassMap.MethodInfo[] methodInfos, int upcastCount) Deprecated.Recursively finds a match for each method, starting with the class, and then searching the superclass and interfaces.- Parameters:
clazz- Class to checkmethodInfos- array of methods we are searching to matchupcastCount- current number of methods we have matched- Returns:
- count of matched methods
-
getPublicMethod
Deprecated.For a given method, retrieves its publicly accessible counterpart. This method will look for a method with same name and signature declared in a public superclass or implemented interface of this method's declaring class. This counterpart method is publicly callable.- Parameters:
method- a method whose publicly callable counterpart is requested.- Returns:
- the publicly callable counterpart method. Note that if the parameter method is itself declared by a public class, this method is an identity function.
-
getPublicMethod
Deprecated.Looks up the method with specified name and signature in the first public superclass or implemented interface of the class.- Parameters:
clazz- the class whose method is soughtname- the name of the methodparamTypes- the classes of method parameters
-
ModelBuilderinstead