Package org.apache.commons.beanutils
Class MethodUtils.MethodDescriptor
- java.lang.Object
-
- org.apache.commons.beanutils.MethodUtils.MethodDescriptor
-
- Enclosing class:
- MethodUtils
private static class MethodUtils.MethodDescriptor extends java.lang.Object
Represents the key to looking up a Method by reflection.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<?>
cls
private boolean
exact
private int
hashCode
private java.lang.String
methodName
private java.lang.Class<?>[]
paramTypes
-
Constructor Summary
Constructors Constructor Description MethodDescriptor(java.lang.Class<?> cls, java.lang.String methodName, java.lang.Class<?>[] paramTypes, boolean exact)
The sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Checks for equality.int
hashCode()
Returns the string length of method name.
-
-
-
Constructor Detail
-
MethodDescriptor
public MethodDescriptor(java.lang.Class<?> cls, java.lang.String methodName, java.lang.Class<?>[] paramTypes, boolean exact)
The sole constructor.- Parameters:
cls
- the class to reflect, must not be nullmethodName
- the method name to obtainparamTypes
- the array of classes representing the parameter typesexact
- whether the match has to be exact.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
Checks for equality.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- object to be tested for equality- Returns:
- true, if the object describes the same Method.
-
hashCode
public int hashCode()
Returns the string length of method name. I.e. if the hashcodes are different, the objects are different. If the hashcodes are the same, need to use the equals method to determine equality.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the string length of method name.
-
-