org.apache.commons.beanutils

Class 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

private Class
cls
private boolean
exact
private int
hashCode
private String
methodName
private Class[]
paramTypes

Constructor Summary

MethodDescriptor(Class cls, String methodName, Class[] paramTypes, boolean exact)
The sole constructor.

Method Summary

boolean
equals(Object obj)
Checks for equality.
int
hashCode()
Returns the string length of method name.

Field Details

cls

private Class cls

exact

private boolean exact

hashCode

private int hashCode

methodName

private String methodName

paramTypes

private Class[] paramTypes

Constructor Details

MethodDescriptor

public MethodDescriptor(Class cls,
                        String methodName,
                        Class[] paramTypes,
                        boolean exact)
The sole constructor.
Parameters:
cls - the class to reflect, must not be null
methodName - the method name to obtain
paramTypes - the array of classes representing the paramater types
exact - whether the match has to be exact.

Method Details

equals

public boolean equals(Object obj)
Checks for equality.
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.
Returns:
the string length of method name.

Copyright (c) 2001-2004 - Apache Software Foundation