|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Information on a Java method.
Method Summary | |
Method |
bestMatch(Method meth)
Find the best match, given two matching methods |
boolean |
exactMatch(Method meth)
Determine whether two methods are exact matches: i.e., whether the names are the same, they take the same number of parameters, and all the parameter types are exactly equal. |
Type |
getDeclaringClass()
Returns the Type object representing the class or
interface that declares the method represented by this object. |
Type[] |
getExceptionTypes()
Returns an array of Type objects that represent the types
of the exceptions declared to be thrown by this method. |
int |
getModifiers()
Returns the Java language modifiers for the method represented by this object, as an integer. |
String |
getName()
Return the name of this method |
Type[] |
getParameterTypes()
Returns an array of Type objects that represent the formal
parameter types, in declaration order, of this method. |
Type |
getReturnType()
Returns a Type object that represents the formal return
type of this method. |
boolean |
isAccessible(Type caller)
Determines whether the method is accessible to a given caller |
boolean |
match(String name,
Type[] params,
Type caller)
Determines whether this method matches the parameters given by a caller |
boolean |
match(Type[] params,
Type caller)
Determines whether this method matches the parameters given by a caller |
Method Detail |
public Type getDeclaringClass()
Type
object representing the class or
interface that declares the method represented by this object.
Type
of the declaring classpublic String getName()
public int getModifiers()
Modifier
class should be used to decode the modifiers.
public Type getReturnType()
Type
object that represents the formal return
type of this method.
public Type[] getParameterTypes()
Type
objects that represent the formal
parameter types, in declaration order, of this method. Returns an
array of length 0 if the underlying method takes no parameters.
public Type[] getExceptionTypes()
Type
objects that represent the types
of the exceptions declared to be thrown by this method. Returns an
array of length 0 if the method declares no exceptions in its
throws
clause.
getExceptionTypes
in interface HasExceptions
public boolean isAccessible(Type caller)
caller
- the type of the caller
true
if the caller is able to access this method,
false
otherwisepublic boolean match(String name, Type[] params, Type caller)
name
- the name of the method to matchparams
- the types of the parameters to the methodcaller
- the type of the caller
true
if this method matches, false
otherwisepublic boolean match(Type[] params, Type caller)
params
- the types of the parameters to the methodcaller
- the type of the caller
true
if this method matches, false
otherwisepublic Method bestMatch(Method meth)
meth
- the other method to compare
null
if neither matches bestpublic boolean exactMatch(Method meth)
meth
- the method to compare against
true
if the methods match exactly;
false
if they differ in any particular
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |