ariba.util.fieldvalue
Class ClassExtensionGetter

java.lang.Object
  extended by ariba.util.fieldvalue.BaseAccessor
      extended by ariba.util.fieldvalue.ReflectionMethodAccessor
          extended by ariba.util.fieldvalue.ReflectionMethodGetter
              extended by ariba.util.fieldvalue.ClassExtensionGetter
All Implemented Interfaces:
FieldValueAccessor, FieldValueGetter

public class ClassExtensionGetter
extends ReflectionMethodGetter

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 ClassExtensionGetter 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.


Field Summary
 
Fields inherited from class ariba.util.fieldvalue.ReflectionMethodGetter
EmptyArray
 
Method Summary
static FieldValueGetter newInstance(java.lang.Class targetClass, java.lang.String fieldName)
          Allocate and initialize a new ClassExtensionGetter for the named ClassExtension, the class of the target object, and the name of the field.
 
Methods inherited from class ariba.util.fieldvalue.ReflectionMethodGetter
getValue, toString
 
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

newInstance

public static FieldValueGetter newInstance(java.lang.Class targetClass,
                                           java.lang.String fieldName)
Allocate and initialize a new ClassExtensionGetter for the named ClassExtension, the class of the target object, and the name of the field. This first attempts 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 getter method for the classExtension and fieldName.

Parameters:
targetClass - the class of the target object
fieldName - the name of the field for which the accessor applies
Returns:
a newly constructed ClassExtensionGetter for getting values


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