public abstract class MetaMethod extends ParameterTypes
Represents a Method on a Java object a little like Method except without using reflection to invoke the method
Fields inherited from class | Fields |
---|---|
class ParameterTypes |
isVargsMethod, nativeParamTypes, parameterTypes |
Constructor and description |
---|
MetaMethod
() Constructor for a metamethod with an empy parameter list |
MetaMethod
(Class[] pt) Constructor wit a list of parameter classes |
Type | Name and description |
---|---|
void |
checkParameters(Class[] arguments) Checks that the given parameters are valid to call this method |
Object |
clone() |
Object |
doMethodInvoke(Object object, Object[] argumentArray) Invokes the method this object represents. |
protected static boolean |
equal(CachedClass[] a, Class[] b) |
protected static boolean |
equal(CachedClass[] a, CachedClass[] b) |
CachedClass |
getDeclaringClass() Gets the class where this method is declared |
String |
getDescriptor() Return a descriptior of this method based on the returntype and parameters of this method. |
int |
getModifiers() Returns the modifiers for this method |
String |
getMopName() |
String |
getName() Returns the name of the method represented by this class |
Class |
getReturnType() Access the return type for this method |
String |
getSignature() Returns the signature of this method |
Object |
invoke(Object object, Object[] arguments) Invoke this method |
boolean |
isAbstract() Returns wether or not this method is abstract. |
boolean |
isCacheable() Returns wether this object is cachable |
boolean |
isMethod(MetaMethod method) Returns true if this this metamethod represents the same method as the argument. |
boolean |
isPrivate() Returns wether or not this method is private. |
boolean |
isProtected() Returns wether or not this method is protected. |
boolean |
isPublic() Returns wether or not this method is public. |
boolean |
isSame(MetaMethod method) @param method the method to compare against |
boolean |
isStatic() Returns wether or not this method is static. |
RuntimeException |
processDoMethodInvokeException(Exception e, Object object, Object[] argumentArray) This method is called when an exception occurs while invoking this method. |
String |
toString() Returns a string representation of this mehthod |
Methods inherited from class | Name |
---|---|
class ParameterTypes |
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getPT, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor for a metamethod with an empy parameter list
Constructor wit a list of parameter classes
pt
- A list of parameters typesChecks that the given parameters are valid to call this method
arguments
- the arguments to checkInvokes the method this object represents. This method is not final but it should be overloaded very carefully and only by generated methods there is no guarantee that it will be called
object
- The object the method is to be called at.argumentArray
- Arguments for the mehtod invokation.Gets the class where this method is declared
Return a descriptior of this method based on the returntype and parameters of this method.
Returns the modifiers for this method
Returns the name of the method represented by this class
Access the return type for this method
Returns the signature of this method
Invoke this method
object
- The object this method should be involded onarguments
- The arguments for the menthod if applicableReturns wether or not this method is abstract.
Returns wether this object is cachable
Returns true if this this metamethod represents the same method as the argument.
method
- A metaMethod instanceReturns wether or not this method is private.
Returns wether or not this method is protected.
Returns wether or not this method is public.
method
- the method to compare againstReturns wether or not this method is static.
This method is called when an exception occurs while invoking this method.
Returns a string representation of this mehthod
Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.