Class ClassExtensionSetter

  extended by ariba.util.fieldvalue.BaseAccessor
      extended by ariba.util.fieldvalue.ReflectionMethodAccessor
          extended by ariba.util.fieldvalue.ReflectionMethodSetter
              extended by ariba.util.fieldvalue.ClassExtensionSetter
All Implemented Interfaces:
FieldValueAccessor, FieldValueSetter

public class ClassExtensionSetter
extends ReflectionMethodSetter

A special FieldValueAccessor subclass which supports the use of the FieldValue subsystem to invoke ClassExtension methods. The main difference between a ClassExtension method and a normal method (implemented on the targetClass proper) is that the first argument of a ClassExtension method is always the targetObject. The ClassExtensionSetter handles this case by invoking the ClassExtension methods with the ClassExtension as the target of the invocation and by passing the actual targte as the first argument in the args array.

Method Summary
static FieldValueSetter newInstance(java.lang.Class targetClass, java.lang.String fieldName)
          Allocate and initialize a new ClassExtensionSetter for the named ClassExtension, the class of the target object, and the name of the field.
Methods inherited from class ariba.util.fieldvalue.ReflectionMethodSetter
Methods inherited from class ariba.util.fieldvalue.ReflectionMethodAccessor
Methods inherited from class ariba.util.fieldvalue.BaseAccessor
forClass, getFieldName, isApplicable
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ariba.util.fieldvalue.FieldValueAccessor
forClass, getFieldName, isApplicable

Method Detail


public static FieldValueSetter newInstance(java.lang.Class targetClass,
                                           java.lang.String fieldName)
Allocate and initialize a new ClassExtensionSetter for the named ClassExtension, the class of the target object, and the name of the field. This first attempes to locate the appropriate class extension for the given name and target class. If it cannot be found, throws a FieldValueException with an informative message. Otherwise, this will lookup the appropriate setter method for the classExtension and fieldName.

targetClass - the class of the target object
fieldName - the name of the field for which the accessor applies
a newly constructed ClassExtensionSetter for setting values

AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.