Package: groovy.lang

## [Java] Class ExpandoMetaClass.ExpandoMetaProperty

- groovy.lang.ExpandoMetaClass.ExpandoMetaProperty

-     protected class ExpandoMetaClass.ExpandoMetaProperty
      extends GroovyObjectSupport

  Instances of this class are returned when using the `<<` left shift operator.

  Example:

  metaClass.myMethod `<<` { String args `->` }

  This allows callbacks to the ExpandoMetaClass for registering appending methods

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected boolean` | `isStatic` | Indicates whether the current expando member is static.
    `protected String` | `propertyName` | Current expando member name being defined.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `protected ExpandoMetaProperty(String name)` Creates an instance-member expando property helper.
    `protected ExpandoMetaProperty(String name, boolean isStatic)` Creates an expando property helper.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Object` | `getProperty(String property)` * Retrieves a property value. * * Parameters: `propertyName` - the name of the property of interest * Returns: the given property
    `` | `public String` | `getPropertyName()` Returns the expando member name currently being configured.
    `` | `public boolean` | `isStatic()` Indicates whether this helper is defining static members.
    `` | `public Object` | `leftShift(Object arg)` Appends a new expando method definition using the `<<` DSL operator.
    `` | `public void` | `setProperty(String property, Object newValue)` * Sets the given property to the new value. * * Parameters: `propertyName` - the name of the property of interest * `newValue` - the new value for the property

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyObjectSupport` | `getMetaClass, setMetaClass`

- - ### Field Detail

    - #### protected boolean isStatic

      Indicates whether the current expando member is static.

    - #### protected String propertyName

      Current expando member name being defined.

  - ### Constructor Detail

    - #### protected ExpandoMetaProperty(String name)

      Creates an instance-member expando property helper.

      Parameters:
        `name` - the member name being defined

    - #### protected ExpandoMetaProperty(String name, boolean isStatic)

      Creates an expando property helper.

      Parameters:
        `name` - the member name being defined
        `isStatic` - whether static members are being defined

  - ### Method Detail

    - #### public Object getProperty(String property)

      * Retrieves a property value. * *

      Parameters:
        `propertyName` - the name of the property of interest *
      Returns:
        the given property

    - #### public String getPropertyName()

      Returns the expando member name currently being configured.

      Returns:
        the current member name

    - #### public boolean isStatic()

      Indicates whether this helper is defining static members.

      Returns:
        `true` for static definitions

    - #### public Object leftShift(Object arg)

      Appends a new expando method definition using the `<<` DSL operator.

      Parameters:
        `arg` - the closure defining the method body
      Returns:
        this helper for fluent use

    - #### public void setProperty(String property, Object newValue)

      * Sets the given property to the new value. * *

      Parameters:
        `propertyName` - the name of the property of interest *
        `newValue` - the new value for the property