|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.enhance.MethodSignatureImpl
public class MethodSignatureImpl
JDK 1.4 based version of MethodSignature.
| Field Summary | |
|---|---|
protected Class[] |
_exceptionTypes
|
protected int |
_hashCode
|
protected String |
_name
|
protected Class[] |
_parameterTypes
|
protected Class |
_returnType
|
| Constructor Summary | |
|---|---|
MethodSignatureImpl(Class returnType,
String name,
Class[] parameterTypes,
Class[] exceptionTypes)
|
|
MethodSignatureImpl(Method m)
|
|
| Method Summary | |
|---|---|
protected static int |
count(Object[] array)
|
boolean |
equals(Object o)
Returns true if the other object is an instance of MethodSignature with identical values for return type, name, parameter types and exception types. |
protected boolean |
exceptionsEncompass(Class[] otherExceptions)
The nuts and bolts of checking that another method signature's exceptions are a subset of this signature's. |
Class[] |
getExceptionTypes()
Returns the exceptions for this method. |
String |
getName()
The name of the method. |
Class[] |
getParameterTypes()
Returns the parameter types for this method. |
Class |
getReturnType()
Method return type. |
String |
getUniqueId()
Returns a string consisting of the name of the method and its parameter values. |
int |
hashCode()
|
boolean |
isGeneric()
If the method definition has generic parameters or return types it is expected that this will return true. |
boolean |
isOverridingSignatureOf(MethodSignature ms)
Returns true if this signature has the same return type, name and parameters types as the method signature passed in, and this signatures exceptions "trump" (are the same as, or super-implementations of, all exceptions thrown by the other method signature). |
protected boolean |
mismatch(Class[] a1,
Class[] a2)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int _hashCode
protected Class _returnType
protected String _name
protected Class[] _parameterTypes
protected Class[] _exceptionTypes
| Constructor Detail |
|---|
public MethodSignatureImpl(Class returnType,
String name,
Class[] parameterTypes,
Class[] exceptionTypes)
public MethodSignatureImpl(Method m)
| Method Detail |
|---|
public Class[] getExceptionTypes()
MethodSignature
getExceptionTypes in interface MethodSignaturepublic String getName()
MethodSignature
getName in interface MethodSignaturepublic Class[] getParameterTypes()
MethodSignature
getParameterTypes in interface MethodSignaturepublic Class getReturnType()
MethodSignature
getReturnType in interface MethodSignaturepublic int hashCode()
hashCode in class Objectprotected static int count(Object[] array)
public boolean equals(Object o)
equals in class Object
protected boolean mismatch(Class[] a1,
Class[] a2)
public String toString()
toString in class Objectpublic String getUniqueId()
MethodSignature#toString(), but omits the return type and information about thrown
exceptions. A unique id is used by MethodIterator to identify overlapping methods
(methods with the same name but different thrown exceptions).
getUniqueId in interface MethodSignaturepublic boolean isGeneric()
MethodSignature
isGeneric in interface MethodSignaturepublic boolean isOverridingSignatureOf(MethodSignature ms)
MethodSignature
isOverridingSignatureOf in interface MethodSignatureprotected boolean exceptionsEncompass(Class[] otherExceptions)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||