MethodBag (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.meta.impl

## Class MethodBag

- java.lang.Object
- - tv.amwa.maj.meta.impl.MethodBag

- Direct Known Subclasses:
    SingletonTypeDefinitionImpl.SingletonMethodBag, TypeDefinitionSetImpl.SetMethodBag, TypeDefinitionVariableArrayImpl.VariableArrayMethodBag

      public abstract class MethodBag
      extends Object

  Collection of Java methods required to manipulate a property value of an AAF type. Implementations of this class scan a set of methods to see if any are annotated with AAF-specific annotations (`MediaPropertySetter`, `MediaSetAdd` etc.). If they are, methods of this class allow invocation of those methods.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MethodBag(Method getter, Method[] candidateMethods, String propertyName)` Create a method bag from a given getter method for a property value, a set of candidate manipulation methods and the defined name of the related property.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `get(MetadataObject mdObject)`
    `String` | `getGetterName()`
    `String` | `getPropertyName()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MethodBag

          public MethodBag(Method getter,
                           Method[] candidateMethods,
                           String propertyName)

      Create a method bag from a given getter method for a property value, a set of candidate manipulation methods and the defined name of the related property.

      Parameters:
        `getter` - Getter method used to retrieve the property value.
        `candidateMethods` - List of candidate manipulation methods.
        `propertyName` - Name of the property this method bag relates to.

  - ### Method Detail

    - #### get

          public Object get(MetadataObject mdObject)
                     throws IllegalArgumentException,
                            IllegalAccessException,
                            InvocationTargetException

      Throws:
        `IllegalArgumentException`
        `IllegalAccessException`
        `InvocationTargetException`

    - #### getPropertyName

          public String getPropertyName()

    - #### getGetterName

          public String getGetterName()

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.