Extends an existing method. The provided method body is inserted at the end of the existing method (i.e. {@link javassist.CtBehavior#insertAfter(java.lang.String)}). To access or change the return value, use the
$_
pseudo variable.
The method may be declared in the class, or may be inherited from a super-class. For inherited methods, a method body is added that first invokes the super implementation. Use {@link #addMethod(TransformMethodSignature,String)} when it is necessary to control when the super-class methodis invoked.
The extended method is considered
new. New methods
are not scanned for {@linkplain #removeField(String)} removed}, {@linkplain #replaceReadAccess(String,String)} read replaced}, or{@linkplain #replaceWriteAccess(String,String) write replaced} fields. Generally that's what you want!
@param methodSignature the signature of the method to extend
@param methodBody the body of code
@throws org.apache.tapestry5.internal.services.MethodCompileException if the provided Javassist method body can not be compiled
@deprecated Use {@link TransformMethod#addAdvice(ComponentMethodAdvice)} instead. This method is non-functionalas of Tapestry 5.2.