| java.lang.Object javassist.expr.Expr javassist.expr.MethodCall
All known Subclasses: javassist.expr.ConstructorCall,
MethodCall | public class MethodCall extends Expr (Code) | | Method invocation (caller-side expression).
|
Method Summary | |
public String | getClassName() Returns the class name of the target object,
which the method is called on. | protected CtClass | getCtClass() Returns the class of the target object,
which the method is called on. | public String | getFileName() Returns the source file containing the method call. | public int | getLineNumber() Returns the line number of the source line containing the
method call. | public CtMethod | getMethod() Returns the called method. | public String | getMethodName() Returns the name of the called method. | public String | getSignature() Returns the method signature (the parameter types
and the return type). | public boolean | isSuper() Returns true if the called method is of a superclass of the current
class. | public CtClass[] | mayThrow() Returns the list of exceptions that the expression may throw. | public void | replace(String statement) Replaces the method call with the bytecode derived from
the given source text. | public CtBehavior | where() Returns the method or constructor containing the method-call
expression represented by this object. |
getClassName | public String getClassName()(Code) | | Returns the class name of the target object,
which the method is called on.
|
getFileName | public String getFileName()(Code) | | Returns the source file containing the method call.
null if this information is not available. |
getLineNumber | public int getLineNumber()(Code) | | Returns the line number of the source line containing the
method call.
-1 if this information is not available. |
getMethodName | public String getMethodName()(Code) | | Returns the name of the called method.
|
isSuper | public boolean isSuper()(Code) | | Returns true if the called method is of a superclass of the current
class.
|
mayThrow | public CtClass[] mayThrow()(Code) | | Returns the list of exceptions that the expression may throw.
This list includes both the exceptions that the try-catch statements
including the expression can catch and the exceptions that
the throws declaration allows the method to throw.
|
replace | public void replace(String statement) throws CannotCompileException(Code) | | Replaces the method call with the bytecode derived from
the given source text.
$0 is available even if the called method is static.
Parameters: statement - a Java statement. |
where | public CtBehavior where()(Code) | | Returns the method or constructor containing the method-call
expression represented by this object.
|
|
|