|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjparse.CompiledMethod
Information on a Java method defined in a Java class file
Field Summary | |
private Method |
theMethod
The method object wrapped by this CompiledMethod object |
Constructor Summary | |
(package private) |
CompiledMethod(Method meth)
Create a new CompiledMethod object |
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 |
String |
toString()
Return a string describing this CompiledMethod |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private final Method theMethod
CompiledMethod
object
Constructor Detail |
CompiledMethod(Method meth)
CompiledMethod
object
meth
- the Method
object to wrapMethod Detail |
public Type getDeclaringClass()
Type
object representing the class or
interface that declares the method represented by this object.
getDeclaringClass
in interface Method
Type
of the declaring classpublic String getName()
getName
in interface Method
public int getModifiers()
Modifier
class should be used to decode the modifiers.
getModifiers
in interface Method
public Type getReturnType()
Type
object that represents the formal return
type of this method.
getReturnType
in interface 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.
getParameterTypes
in interface Method
public Type[] getExceptionTypes()
Method
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 Method
public boolean isAccessible(Type caller)
Method
isAccessible
in interface Method
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)
match
in interface Method
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)
match
in interface Method
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)
bestMatch
in interface Method
meth
- the other method to compare
null
if neither matches bestpublic boolean exactMatch(Method meth)
Method
exactMatch
in interface Method
meth
- the method to compare against
true
if the methods match exactly;
false
if they differ in any particularpublic String toString()
CompiledMethod
CompiledMethod
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |