| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addMetaBeanProperty(MetaBeanProperty
The MetaBeanProperty instance metaBeanProperty)Implements groovy. |
| public void | addMetaMethod(MetaMethod
The MetaMethod to add metaMethod)Implements groovy. |
| public void | addNewInstanceMethod(Method
the method to be added method)Implements groovy. |
| public void | addNewStaticMethod(Method
the method to be added method)Implements groovy. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public MetaClass | |
| 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)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)Implements groovy. |
| public ClassNode | getClassNode()
Implements groovy. |
| public MetaClass | getMetaClass()
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)Implements groovy. |
| public List | getMetaMethods()
Implements groovy. |
| public MetaProperty | getMetaProperty(String
The name of the MetaProperty name)Implements groovy. |
| public List | getMethods()
Implements groovy. |
| public List | getProperties()
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)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)Implements groovy. Retrieves a property on the given receiver for the specified arguments. |
| public Object | getProperty(String
the name of the property of interest property)Overrides default groovy. |
| public MetaMethod | getStaticMetaMethod(String
The name of the MetaMethod name, Object[] The argument types args)Implements groovy. |
| public MetaMethod | |
| public Class | getTheClass()
Implements groovy. |
| public int | |
| public MetaProperty | hasProperty(Object
The object to inspect obj, String The name of the property name)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 void | |
| public Object | invokeConstructor(Object[]
The arguments to the constructor arguments)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)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)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)Implements groovy. Invokes a method on the given receiver for the specified arguments. |
| public Object | invokeMethod(String
the name of the method to call name, Object the arguments to use for the method call args)Overrides default groovy. |
| 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)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)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)Implements groovy. |
| public boolean | |
| public boolean | isModified()
Implements groovy. |
| public MetaMethod | pickMethod(String
the name of the method to pick methodName, Class<T>[] the method arguments arguments)Implements groovy.
Deprecated
Selects a method by name and argument classes.
|
| 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)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)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)Implements groovy. |
| public void | |
| 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)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)Implements groovy. |
| public void | setMetaClass(MetaClass
the new metaclass metaClass)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)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)Implements groovy. Sets a property on the given receiver for the specified arguments. |
| public void | setProperty(String
the name of the property of interest property, Object the new value for the property newValue)Overrides default groovy. |
| public String |
| delegate | back to summary |
|---|---|
| protected MetaClass delegate | |
| DelegatingMetaClass | back to summary |
|---|---|
| public DelegatingMetaClass(final MetaClass delegate) | |
| DelegatingMetaClass | back to summary |
|---|---|
| public DelegatingMetaClass(final Class<T> theClass) | |
| addMetaBeanProperty | back to summary |
|---|---|
| public void addMetaBeanProperty(MetaBeanProperty metaBeanProperty) Implements groovy. Doc from groovy. Adds a new MetaBeanProperty to the MetaClass
| |
| addMetaMethod | back to summary |
|---|---|
| public void addMetaMethod(MetaMethod metaMethod) Implements groovy. Doc from groovy. Adds a new MetaMethod to the MetaClass
| |
| addNewInstanceMethod | back to summary |
|---|---|
| public void addNewInstanceMethod(Method method) Implements groovy. Doc from groovy. adds a new instance method to this MetaClass. Instance methods are able to overwrite the original methods of the class. Calling this method should not be done after initialise was called.
| |
| addNewStaticMethod | back to summary |
|---|---|
| public void addNewStaticMethod(Method method) Implements groovy. Doc from groovy. adds a new static method to this MetaClass. This is only possible as long as initialise was not called.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. 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.
| |
| getAdaptee | back to summary |
|---|---|
| public MetaClass getAdaptee() | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(Object object, String attribute) 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) 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() Implements groovy. Doc from groovy. Obtains a reference to the original AST for the MetaClass if it is available at runtime
| |
| getMetaClass | back to summary |
|---|---|
| public MetaClass getMetaClass() Implements groovy. Doc from groovy. Returns the metaclass for a given class.
| |
| getMetaMethod | back to summary |
|---|---|
| public MetaMethod getMetaMethod(String name, Object[] args) 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
| |
| getMetaMethods | back to summary |
|---|---|
| public List 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) 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 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.
| |
| getProperties | back to summary |
|---|---|
| public List 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) 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) 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
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String property) Overrides default groovy. Doc from groovy. Retrieves a property value. | |
| getStaticMetaMethod | back to summary |
|---|---|
| public MetaMethod getStaticMetaMethod(String name, Object[] args) 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) | |
| getTheClass | back to summary |
|---|---|
| public Class Implements groovy. Doc from groovy. Retrieves that Java Class that the attached Meta behaviours apply to
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. 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) 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
| |
| initialize | back to summary |
|---|---|
| public void initialize() Implements groovy. Doc from groovy. Complete the initialisation process. After this method is called no methods should be added to the meta class. Invocation of methods or access to fields/properties is forbidden unless this method is called. This method should contain any initialisation code, taking a longer time to complete. An example is the creation of the Reflector. It is suggested to synchronize this method. | |
| invokeConstructor | back to summary |
|---|---|
| public Object invokeConstructor(Object[] arguments) 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) 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) 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) 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
| |
| invokeMethod | back to summary |
|---|---|
| public Object invokeMethod(String name, Object args) Overrides default groovy. Doc from groovy. Invokes the given method. | |
| invokeMissingMethod | back to summary |
|---|---|
| public Object invokeMissingMethod(Object instance, String methodName, Object[] arguments) 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) 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) 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() | |
| isModified | back to summary |
|---|---|
| public boolean isModified() Implements groovy. Doc from groovy. Return whether the MetaClass has been modified or not
| |
| pickMethod | back to summary |
|---|---|
| public MetaMethod pickMethod(String methodName, Class<T>[] arguments) Implements groovy. Doc from groovy. Deprecated
Selects a method by name and argument classes. This method does not search for an exact match, it searches for a compatible method. For this the method selection mechanism is used as provided by the implementation of this MetaClass. pickMethod may or may not be used during the method selection process when invoking a method. There is no warranty for that.
| |
| respondsTo | back to summary |
|---|---|
| public List 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 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) Implements groovy. Doc from groovy. Internal method to support Groovy runtime. Not for client usage.
| |
| setAdaptee | back to summary |
|---|---|
| public void setAdaptee(MetaClass adaptee) | |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(Object object, String attribute, Object newValue) 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) 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.
| |
| setMetaClass | back to summary |
|---|---|
| public void setMetaClass(MetaClass metaClass) Implements groovy. Doc from groovy. Allows the MetaClass to be replaced with a derived implementation.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(Object object, String property, Object newValue) 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) 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
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String property, Object newValue) Overrides default groovy. Doc from groovy. Sets the given property to the new value. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |