org.apache.tapestry5.internal.bindings

## Class PropBinding

- java.lang.Object
- - org.apache.tapestry5.ioc.BaseLocatable
  - - org.apache.tapestry5.internal.bindings.AbstractBinding
    - - org.apache.tapestry5.internal.bindings.PropBinding

- All Implemented Interfaces:
    Binding, Binding2, InternalPropBinding, AnnotationProvider, Locatable

      public class PropBinding
      extends AbstractBinding
      implements InternalPropBinding

  Base class for bindings created by the `PropBindingFactory`. A subclass of this is created at runtime.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropBinding(Location location, Object root, PropertyConduit conduit, String expression, String toString)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `get()` The default implementation of get() will throw a TapestryException (binding is write only).
    `<T extends Annotation> T` | `getAnnotation(Class<T> annotationClass)` Always returns null.
    `Type` | `getBindingGenericType()` Get the generic type from the underlying property
    `Class` | `getBindingType()` Returns the actual class, by invoking `Binding.get()`.
    `String` | `getExpression()`
    `String` | `getPropertyName()` Returns the name of the property, if exists.
    `boolean` | `isInvariant()` Almost always returns false, unless the conduit provides the `Invariant` annotation.
    `void` | `set(Object value)` Updates the current value.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.tapestry5.ioc.BaseLocatable

      `getLocation`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PropBinding

          public PropBinding(Location location,
                             Object root,
                             PropertyConduit conduit,
                             String expression,
                             String toString)

  - ### Method Detail

    - #### get

          public Object get()

      The default implementation of get() will throw a TapestryException (binding is write only). The fabricated subclass may override this method (as well as set()).
      Specified by:
        `get` in interface `Binding`

    - #### set

          public void set(Object value)

      Description copied from interface: `Binding`
      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.
      Specified by:
        `set` in interface `Binding`
      Overrides:
        `set` in class `AbstractBinding`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### isInvariant

          public boolean isInvariant()

      Almost always returns false, unless the conduit provides the `Invariant` annotation.
      Specified by:
        `isInvariant` in interface `Binding`
      Overrides:
        `isInvariant` in class `AbstractBinding`

    - #### getBindingType

          public Class getBindingType()

      Description copied from class: `AbstractBinding`
      Returns the actual class, by invoking `Binding.get()`. Subclasses may override this method to work more efficiently (say, when the binding type is known statically).
      Specified by:
        `getBindingType` in interface `Binding`
      Overrides:
        `getBindingType` in class `AbstractBinding`

    - #### getBindingGenericType

          public Type getBindingGenericType()

      Get the generic type from the underlying property
      Specified by:
        `getBindingGenericType` in interface `Binding2`
      Overrides:
        `getBindingGenericType` in class `AbstractBinding`
      See Also:
        `PropertyConduit2.getPropertyGenericType()`

    - #### getAnnotation

          public <T extends Annotation> T getAnnotation(Class<T> annotationClass)

      Description copied from class: `AbstractBinding`
      Always returns null. Bindings that provide access to a method or field will override this method to return the appropriate annotation.
      Specified by:
        `getAnnotation` in interface `AnnotationProvider`
      Overrides:
        `getAnnotation` in class `AbstractBinding`
      Parameters:
        `annotationClass` - used to select the annotation to return
      Returns:
        the annotation, or null if not found

    - #### getPropertyName

          public String getPropertyName()

      Description copied from interface: `InternalPropBinding`
      Returns the name of the property, if exists.
      Specified by:
        `getPropertyName` in interface `InternalPropBinding`

    - #### getExpression

          public String getExpression()

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.