Package org.codehaus.groovy.classgen.asm
Class MopWriter
- java.lang.Object
-
- org.codehaus.groovy.classgen.asm.MopWriter
-
- Direct Known Subclasses:
StaticCompilationMopWriter
public class MopWriter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MopWriter.Factory
-
Field Summary
Fields Modifier and Type Field Description static MopWriter.Factory
FACTORY
-
Constructor Summary
Constructors Constructor Description MopWriter(WriterController controller)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
createMopMethods()
static boolean
equalParameterTypes(Parameter[] p1, Parameter[] p2)
Deprecated.protected void
generateMopCalls(LinkedList<MethodNode> mopCalls, boolean useThis)
Generates a Meta Object Protocol method, that is used to call a non public method, or to make a call to super.static String
getMopMethodName(MethodNode method, boolean useThis)
Creates a MOP method name from a method.static boolean
isMopMethod(String methodName)
Determines if a method is a MOP method.
-
-
-
Field Detail
-
FACTORY
public static final MopWriter.Factory FACTORY
-
-
Constructor Detail
-
MopWriter
public MopWriter(WriterController controller)
-
-
Method Detail
-
createMopMethods
public void createMopMethods()
-
getMopMethodName
public static String getMopMethodName(MethodNode method, boolean useThis)
Creates a MOP method name from a method.- Parameters:
method
- the method to be called by the mop methoduseThis
- if true, then it is a call on "this", "super" else- Returns:
- the mop method name
-
isMopMethod
public static boolean isMopMethod(String methodName)
Determines 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.- Parameters:
methodName
- name of the method to test- Returns:
- true if the method is a MOP method
-
generateMopCalls
protected void generateMopCalls(LinkedList<MethodNode> mopCalls, boolean useThis)
Generates a Meta Object Protocol method, that is used to call a non public method, or to make a call to super.- Parameters:
mopCalls
- list of methods a mop call method should be generated foruseThis
- true if "this" should be used for the naming
-
equalParameterTypes
@Deprecated public static boolean equalParameterTypes(Parameter[] p1, Parameter[] p2)
Deprecated.
-
-