MCPcopy
hub / github.com/apache/groovy / MetaMethod

Class MetaMethod

src/main/java/groovy/lang/MetaMethod.java:33–328  ·  view source on GitHub ↗

Represents a Method on a Java object a little like java.lang.reflect.Method except without using reflection to invoke the method

Source from the content-addressed store, hash-verified

31 * except without using reflection to invoke the method
32 */
33public abstract class MetaMethod extends ParameterTypes implements MetaMember, Cloneable {
34
35 /**
36 * Shared empty array of meta methods.
37 */
38 public static final MetaMethod[] EMPTY_ARRAY = new MetaMethod[0];
39 private String signature;
40 private String mopName;
41
42 /**
43 * Constructor for a metamethod with an empty parameter list.
44 */
45 public MetaMethod() {
46 }
47
48 /**
49 * Constructor with a list of parameter classes.
50 *
51 * @param pt A list of parameters types
52 */
53 public MetaMethod(Class [] pt) {
54 super (pt);
55 }
56
57 /**
58 * Returns the modifiers of this method.
59 *
60 * @return modifiers as an int.
61 */
62 public abstract int getModifiers();
63
64 /**
65 * Returns the name of this method.
66 *
67 * @return name of this method
68 */
69 public abstract String getName();
70
71 /**
72 * Returns the return type for this method.
73 *
74 *@return the return type of this method
75 */
76 public abstract Class getReturnType();
77
78 /**
79 * Gets the class where this method is declared.
80 *
81 * @return class of this method
82 */
83 public abstract CachedClass getDeclaringClass();
84
85 /**
86 * Checks that the given parameters are valid to call this method.
87 *
88 * @param arguments the arguments to check
89 * @throws IllegalArgumentException if the parameters are not valid
90 * @deprecated

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…