public class MopWriter
extends Object
Generates bytecode for Meta Object Protocol (MOP) methods.
| Modifiers | Name | Description |
|---|---|---|
interface |
MopWriter.Factory |
Factory interface for creating MopWriter instances. |
| Modifiers | Name | Description |
|---|---|---|
static Factory |
FACTORY |
Default factory for MopWriter instances. |
protected WriterController |
controller |
The controller coordinating all bytecode writers for the current class. |
| Constructor and description |
|---|
MopWriter(WriterController controller)Creates a MopWriter with the given controller. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
createMopMethods()Generates MOP methods for the current class. |
|
public static boolean |
equalParameterTypes(Parameter[] p1, Parameter[] p2)Checks if two parameter arrays are equal. |
|
protected void |
generateMopCalls(LinkedList<MethodNode> methods, boolean useThis)Generates a Meta Object Protocol method that is used to call a non-public method or to make a call to super. |
|
public static String |
getMopMethodName(MethodNode method, boolean useThis)Creates a MOP method name from a method. |
|
public static boolean |
isMopMethod(String methodName)Determines if a method is a MOP method. |
Default factory for MopWriter instances.
The controller coordinating all bytecode writers for the current class.
Creates a MopWriter with the given controller.
controller - the writer controllerGenerates MOP methods for the current class.
Checks if two parameter arrays are equal.
p1 - first parameter arrayp2 - second parameter arrayGenerates a Meta Object Protocol method that is used to call a non-public method or to make a call to super.
methods - list of methods a MOP call method should be generated foruseThis - indicates if "this" should be used for the name and callCreates a MOP method name from a method.
method - the method to be called by the mop methoduseThis - if true, then it is a call on "this", "super" elseDetermines if a method is a MOP method. This is done by the method name. If the name starts with "this$" or "super$" but does not contain "$dist$", then it is an MOP method.
methodName - name of the method to testCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.