| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides groovy. |
| public Object | getAttribute(Object
An instance of the class returned by the getTheClass() method object, String The name of the attribute to retrieve the value for attribute)Overrides groovy. Implements groovy. |
| public Object | getAttribute(Class<T>
The class of the object that requested the attribute sender, Object The instance receiver, String The name of the attribute messageName, boolean Whether to look-up on the super class or not useSuper)Overrides groovy. Implements groovy. |
| public ClassNode | getClassNode()
Overrides groovy. Implements groovy. |
| public MetaMethod | getMetaMethod(String
The name of the MetaMethod name, Object[] Array containing - 1) the argument values (using which their types are then inferred), or 2) the corresponding argument types args)Overrides groovy. Implements groovy. |
| public MetaMethod | |
| public List | getMetaMethods()
Overrides groovy. Implements groovy. |
| public MetaProperty | getMetaProperty(String
The name of the MetaProperty name)Overrides groovy. Implements groovy. |
| public List | getMethods()
Overrides groovy. Implements groovy. |
| protected abstract Object | |
| protected abstract MetaClass | |
| public List | getProperties()
Overrides groovy. Implements groovy. |
| public Object | getProperty(Object
An instance of the class returned by the getTheClass() method object, String The name of the property to retrieve the value for property)Overrides groovy. Implements groovy. |
| public Object | getProperty(Class<T>
The java.lang.Class instance that requested the property sender, Object The Object which the property is being retrieved from receiver, String The name of the property messageName, boolean Whether the call is to a super class property useSuper, boolean ?? fromInsideClass)Overrides groovy. Implements groovy. Retrieves a property on the given receiver for the specified arguments. |
| public MetaMethod | getStaticMetaMethod(String
The name of the MetaMethod name, Object[] The argument types args)Overrides groovy. Implements groovy. |
| public MetaMethod | getStaticMetaMethod(String name, Class<T>[] argTypes)
Overrides groovy. |
| public Class | getTheClass()
Overrides groovy. Implements groovy. |
| public int | hashCode()
Overrides groovy. |
| public MetaProperty | hasProperty(Object
The object to inspect obj, String The name of the property name)Overrides groovy. Implements groovy. Returns true of the implementing MetaClass has a property of the given name Note that this method will only return true for realised properties and does not take into account implementation of getProperty or propertyMissing |
| public Object | invokeConstructor(Object[]
The arguments to the constructor arguments)Overrides groovy. Implements groovy. |
| public Object | invokeMethod(Object
The Object to invoke the method on object, String The name of the method methodName, Object The argument to the method arguments)Overrides groovy. Implements groovy. |
| public Object | invokeMethod(Object
The instance which the method is invoked on object, String The name of the method methodName, Object[] The arguments to the method arguments)Overrides groovy. Implements groovy. |
| public Object | invokeMethod(Class<T>
The java.lang.Class instance that invoked the method sender, Object The object which the method was invoked on receiver, String The name of the method methodName, Object[] The arguments to the method arguments, boolean Whether the method is a call to a super class method isCallToSuper, boolean Whether the call was invoked from the inside or the outside of the class fromInsideClass)Overrides groovy. Implements groovy. Invokes a method on the given receiver for the specified arguments. |
| public Object | invokeMissingMethod(Object
The instance to invoke methodMissing on instance, String The name of the method methodName, Object[] The arguments to the method arguments)Overrides groovy. Implements groovy. Attempts to invoke the methodMissing method otherwise throws a MissingMethodException |
| public Object | invokeMissingProperty(Object
The instance of the class instance, String The name of the property propertyName, Object The value of the property which could be null in the case of a getter optionalValue, boolean Whether the missing property event was the result of a getter or a setter isGetter)Overrides groovy. Implements groovy. |
| public Object | invokeStaticMethod(Object
An instance of the class returned by the getTheClass() method or the class itself object, String The name of the method methodName, Object[] The arguments to the method arguments)Overrides groovy. Implements groovy. |
| public boolean | |
| public List | respondsTo(Object
The object to inspect obj, String The name of the method of interest name, Object[] The argument types to match against argTypes)Overrides groovy. Implements groovy. Returns an object satisfying Groovy truth if the implementing MetaClass responds to a method with the given name and arguments types. |
| public List | respondsTo(Object
The object to inspect obj, String The name of the method of interest name)Overrides groovy. Implements groovy. Returns an object satisfying Groovy truth if the implementing MetaClass responds to a method with the given name regardless of arguments. |
| public int | selectConstructorAndTransformArguments(int
The number of constructors numberOfConstructors, Object[] The arguments arguments)Overrides groovy. Implements groovy. |
| public void | setAttribute(Object
An instance of the class returned by the getTheClass() method object, String The name of the attribute to set attribute, Object The new value of the attribute newValue)Overrides groovy. Implements groovy. |
| public void | setAttribute(Class<T>
The class of the object that requested the attribute sender, Object The instance receiver, String The name of the attribute messageName, Object The value of the attribute messageValue, boolean Whether to look-up on the super class or not useSuper, boolean Whether the call happened from the inside or the outside of a class fromInsideClass)Overrides groovy. Implements groovy. |
| public void | setProperty(Object
An instance of the class returned by the getTheClass() method object, String The name of the property to set property, Object The new value of the property newValue)Overrides groovy. Implements groovy. |
| public void | setProperty(Class<T>
The java.lang.Class instance that is mutating the property sender, Object The Object which the property is being set on receiver, String The name of the property messageName, Object The new value of the property to set messageValue, boolean Whether the call is to a super class property useSuper, boolean Whether the call was invoked from the inside or the outside of the class fromInsideClass)Overrides groovy. Implements groovy. Sets a property on the given receiver for the specified arguments. |
| public String | toString()
Overrides groovy. |
| OwnedMetaClass | back to summary |
|---|---|
| public OwnedMetaClass(final MetaClass delegate) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides groovy. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(Object object, String attribute) Overrides groovy. Implements groovy. Doc from groovy. Retrieves an attribute of an instance of the class returned by the getTheClass() method. What this means is largely down to the MetaClass implementation, however the default case would result in attempt to read a field of the instance. | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(Class<T> sender, Object receiver, String messageName, boolean useSuper) Overrides groovy. Implements groovy. Doc from groovy. Retrieves the value of an attribute (field). This method is to support the Groovy runtime and not for general client API usage. | |
| getClassNode | back to summary |
|---|---|
| public ClassNode getClassNode() Overrides groovy. Implements groovy. Doc from groovy. Obtains a reference to the original AST for the MetaClass if it is available at runtime
| |
| getMetaMethod | back to summary |
|---|---|
| public MetaMethod getMetaMethod(String name, Object[] args) Overrides groovy. Implements groovy. Doc from groovy. Retrieves an instance MetaMethod for the given name and argument values, using the types of the argument values to establish the chosen MetaMethod
| |
| getMetaMethod | back to summary |
|---|---|
| public MetaMethod getMetaMethod(String name, Class<T>[] argTypes) | |
| getMetaMethods | back to summary |
|---|---|
| public List Overrides groovy. Implements groovy. Doc from groovy. Retrieves a list of MetaMethods held by this class. This list includes MetaMethods added by groovy.lang.ExpandoMetaClass.
| |
| getMetaProperty | back to summary |
|---|---|
| public MetaProperty getMetaProperty(String name) Overrides groovy. Implements groovy. Doc from groovy. Returns a MetaProperty for the given name or null if it doesn't exist
| |
| getMethods | back to summary |
|---|---|
| public List Overrides groovy. Implements groovy. Doc from groovy. Retrieves a list of MetaMethods held by the class. This list does not include MetaMethods added by groovy.lang.ExpandoMetaClass.
| |
| getOwner | back to summary |
|---|---|
| protected abstract Object getOwner() | |
| getOwnerMetaClass | back to summary |
|---|---|
| protected abstract MetaClass getOwnerMetaClass(Object owner) | |
| getProperties | back to summary |
|---|---|
| public List Overrides groovy. Implements groovy. Doc from groovy. Retrieves a list of MetaProperty instances that the MetaClass has
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(Object object, String property) Overrides groovy. Implements groovy. Doc from groovy. Retrieves a property of an instance of the class returned by the getTheClass() method. What this means is largely down to the MetaClass implementation, however the default case would result in an attempt to invoke a JavaBean getter, or if no such getter exists a public field of the instance. | |
| getProperty | back to summary |
|---|---|
| public Object getProperty(Class<T> sender, Object receiver, String messageName, boolean useSuper, boolean fromInsideClass) Overrides groovy. Implements groovy. Doc from groovy. Retrieves a property on the given receiver for the specified arguments. The sender is the class that is requesting the property from the object. The MetaClass will attempt to establish the method to invoke based on the name and arguments provided. The isCallToSuper and fromInsideClass help the Groovy runtime perform optimisations on the call to go directly to the super class if necessary
| |
| getStaticMetaMethod | back to summary |
|---|---|
| public MetaMethod getStaticMetaMethod(String name, Object[] args) Overrides groovy. Implements groovy. Doc from groovy. Retrieves a static MetaMethod for the given name and argument values, using the types of the arguments to establish the chosen MetaMethod
| |
| getStaticMetaMethod | back to summary |
|---|---|
| public MetaMethod getStaticMetaMethod(String name, Class<T>[] argTypes) Overrides groovy. | |
| getTheClass | back to summary |
|---|---|
| public Class Overrides groovy. Implements groovy. Doc from groovy. Retrieves that Java Class that the attached Meta behaviours apply to
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides groovy. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasProperty | back to summary |
|---|---|
| public MetaProperty hasProperty(Object obj, String name) Overrides groovy. Implements groovy. Doc from groovy. Returns true of the implementing MetaClass has a property of the given name Note that this method will only return true for realised properties and does not take into account implementation of getProperty or propertyMissing
| |
| invokeConstructor | back to summary |
|---|---|
| public Object invokeConstructor(Object[] arguments) Overrides groovy. Implements groovy. Doc from groovy. Invokes a constructor for the given arguments. The MetaClass will attempt to pick the best argument which matches the types of the objects passed within the arguments array | |
| invokeMethod | back to summary |
|---|---|
| public Object invokeMethod(Object object, String methodName, Object arguments) Overrides groovy. Implements groovy. Doc from groovy. Invokes a method on the given object, with the given name and single argument. | |
| invokeMethod | back to summary |
|---|---|
| public Object invokeMethod(Object object, String methodName, Object[] arguments) Overrides groovy. Implements groovy. Doc from groovy. Invokes a method on the given Object with the given name and arguments. The MetaClass will attempt to pick the best method for the given name and arguments. If a method cannot be invoked a MissingMethodException will be thrown. | |
| invokeMethod | back to summary |
|---|---|
| public Object invokeMethod(Class<T> sender, Object receiver, String methodName, Object[] arguments, boolean isCallToSuper, boolean fromInsideClass) Overrides groovy. Implements groovy. Doc from groovy. Invokes a method on the given receiver for the specified arguments. The sender is the class that invoked the method on the object. The MetaClass will attempt to establish the method to invoke based on the name and arguments provided. The isCallToSuper and fromInsideClass help the Groovy runtime perform optimisations on the call to go directly to the super class if necessary
| |
| invokeMissingMethod | back to summary |
|---|---|
| public Object invokeMissingMethod(Object instance, String methodName, Object[] arguments) Overrides groovy. Implements groovy. Doc from groovy. Attempts to invoke the methodMissing method otherwise throws a MissingMethodException | |
| invokeMissingProperty | back to summary |
|---|---|
| public Object invokeMissingProperty(Object instance, String propertyName, Object optionalValue, boolean isGetter) Overrides groovy. Implements groovy. Doc from groovy. Invokes the propertyMissing method otherwise throws a MissingPropertyException
| |
| invokeStaticMethod | back to summary |
|---|---|
| public Object invokeStaticMethod(Object object, String methodName, Object[] arguments) Overrides groovy. Implements groovy. Doc from groovy. Invokes a static method on the given Object with the given name and arguments. The Object can either be an instance of the class that this MetaObjectProtocol instance applies to or the java.lang.Class instance itself. If a method cannot be invoked a MissingMethodException is will be thrown | |
| isGroovyObject | back to summary |
|---|---|
| public boolean isGroovyObject() | |
| respondsTo | back to summary |
|---|---|
| public List Overrides groovy. Implements groovy. Doc from groovy. Returns an object satisfying Groovy truth if the implementing MetaClass responds to a method with the given name and arguments types. Note that this method's return value is based on realised methods and does not take into account objects or classes that implement invokeMethod or methodMissing This method is "safe" in that it will always return a value and never throw an exception
| |
| respondsTo | back to summary |
|---|---|
| public List Overrides groovy. Implements groovy. Doc from groovy. Returns an object satisfying Groovy truth if the implementing MetaClass responds to a method with the given name regardless of arguments. In other words this method will return for foo() and foo(String). Note that this method's return value is based on realised methods and does not take into account objects or classes that implement invokeMethod or methodMissing This method is "safe" in that it will always return a value and never throw an exception
| |
| selectConstructorAndTransformArguments | back to summary |
|---|---|
| public int selectConstructorAndTransformArguments(int numberOfConstructors, Object[] arguments) Overrides groovy. Implements groovy. Doc from groovy. Internal method to support Groovy runtime. Not for client usage.
| |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(Object object, String attribute, Object newValue) Overrides groovy. Implements groovy. Doc from groovy. Sets an attribute of an instance of the class returned by the getTheClass() method. What this means is largely down to the MetaClass implementation, however the default case would result in an attempt to set a field of the instance. | |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(Class<T> sender, Object receiver, String messageName, Object messageValue, boolean useSuper, boolean fromInsideClass) Overrides groovy. Implements groovy. Doc from groovy. Sets the value of an attribute (field). This method is to support the Groovy runtime and not for general client API usage.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(Object object, String property, Object newValue) Overrides groovy. Implements groovy. Doc from groovy. Sets a property of an instance of the class returned by the getTheClass() method. What this means is largely down to the MetaClass implementation, however the default case would result in an attempt to invoke a JavaBean setter, or if no such setter exists to set a public field of the instance. | |
| setProperty | back to summary |
|---|---|
| public void setProperty(Class<T> sender, Object receiver, String messageName, Object messageValue, boolean useSuper, boolean fromInsideClass) Overrides groovy. Implements groovy. Doc from groovy. Sets a property on the given receiver for the specified arguments. The sender is the class that is setting the property from the object. The MetaClass will attempt to establish the method to invoke based on the name and arguments provided. The isCallToSuper and fromInsideClass help the Groovy runtime perform optimisations on the call to go directly to the super class if necessary
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides groovy. Doc from java. Returns a string representation of the object.
| |