Package groovy.lang

Class ExpandoMetaClass.ExpandoMetaProperty

  • All Implemented Interfaces:
    GroovyObject
    Enclosing class:
    ExpandoMetaClass

    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 Detail

      • propertyName

        protected String propertyName
      • isStatic

        protected boolean isStatic
    • Constructor Detail

      • ExpandoMetaProperty

        protected ExpandoMetaProperty​(String name)
      • ExpandoMetaProperty

        protected ExpandoMetaProperty​(String name,
                                      boolean isStatic)
    • Method Detail

      • getPropertyName

        public String getPropertyName()
      • isStatic

        public boolean isStatic()
      • getProperty

        public Object getProperty​(String property)
        Description copied from interface: GroovyObject
        Retrieves a property value.
        Parameters:
        property - the name of the property of interest
        Returns:
        the given property
      • setProperty

        public void setProperty​(String property,
                                Object newValue)
        Description copied from interface: GroovyObject
        Sets the given property to the new value.
        Parameters:
        property - the name of the property of interest
        newValue - the new value for the property