org.apache.tapestry5

## Interface Binding

- All Superinterfaces:
    AnnotationProvider
  All Known Subinterfaces:
    Binding2, InternalPropBinding
  All Known Implementing Classes:
    AbstractBinding, AssetBinding, AttributeExpansionBinding, BlockBinding, ComponentBinding, InvariantBinding, LiteralBinding, PropBinding, RenderVariableBinding

      public interface Binding
      extends AnnotationProvider

  A binding is a connection between a component and its container (another component), that allows the embedded component to gain access to resources defined by the container. Resources can represent any kind of value that can be obtained from the parent component, but is often a JavaBean property that can be read and updated. Different implementations of Binding are used to access different kinds of resources of the container. A binding ultimately must provide access to the underlying annotations. In most cases, there are no annotations, but bindings that ultimate invoke methods or read and update fields must provide access to those annotations.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `get()` Reads the current value of the property (or other resource).
    `Class` | `getBindingType()` Returns the type of the binding, either the type of resource exposed by the binding, or the type of the property bound.
    `boolean` | `isInvariant()` Returns true if the value of the binding does not ever change.
    `void` | `set(Object value)` Updates the current value.

    - ### Methods inherited from interface org.apache.tapestry5.ioc.AnnotationProvider

      `getAnnotation`

- - ### Method Detail

    - #### get

          Object get()

      Reads the current value of the property (or other resource). When reading properties of objects that are primitive types, this will return an instance of the wrapper type. In some cases, a binding is read only and this method will throw a runtime exception.

    - #### set

          void set(Object value)

      Updates the current value. Most types of bindings are read-only, and this method will throw a runtime exception. It is the caller's responsibility to ensure that the value passed in is of the appropriate type.
      Parameters:
        `value` -

    - #### isInvariant

          boolean isInvariant()

      Returns true if the value of the binding does not ever change. Components will often cache such values aggressively.

    - #### getBindingType

          Class getBindingType()

      Returns the type of the binding, either the type of resource exposed by the binding, or the type of the property bound.

5.6.1 - Copyright © 2003-2020 The Apache Software Foundation.