Package: org.codehaus.groovy.runtime.metaclass

## [Java] Class MethodMetaProperty

- org.codehaus.groovy.runtime.metaclass.MethodMetaProperty

-     public class MethodMetaProperty
      extends MetaProperty

  Wrapper for a method for a property get or set. WARNING: This class is for internal use only, don't use it for your APIs

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `MethodMetaProperty.GetBeanMethodMetaProperty` | Wrapper for a method realizing the property getter.
    `static class` | `MethodMetaProperty.GetMethodMetaProperty` | Wrapper for a method realizing the property get.

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class MetaProperty` | `PROPERTY_SET_PREFIX, name, type`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `MethodMetaProperty(String name, MetaMethod method)` Constructs a new MethodMetaProperty.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public MetaMethod` | `getMetaMethod()` Gets the underlying metamethod.
    `` | `public Object` | `getProperty(Object object)` Gets the property value by invoking the metamethod.
    `` | `public void` | `setProperty(Object object, Object newValue)` Sets the property value by invoking the metamethod.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class MetaProperty` | `getGetterName, getModifiers, getName, getProperty, getSetterName, getType, setProperty`

- - ### Constructor Detail

    - #### public MethodMetaProperty(String name, MetaMethod method)

      Constructs a new MethodMetaProperty.

      Parameters:
        `name` - the property name
        `method` - the metamethod to wrap

  - ### Method Detail

    - #### public MetaMethod getMetaMethod()

      Gets the underlying metamethod.

      Returns:
        the metamethod

    - #### public Object getProperty(Object object)

      Gets the property value by invoking the metamethod. This method always throws UnsupportedOperationException as this is just a wrapper.

      throws:
        UnsupportedOperationException always
      Parameters:
        `object` - the object (not used)
      Returns:
        never returns

    - #### public void setProperty(Object object, Object newValue)

      Sets the property value by invoking the metamethod. This method always throws UnsupportedOperationException as this is just a wrapper.

      throws:
        UnsupportedOperationException always
      Parameters:
        `object` - the object (not used)
        `newValue` - the new value (not used)