All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.util.es.ExtraStuffAggregator
java.lang.Object
|
+----com.ibm.beans.util.es.ExtraStuffAggregator
- public class ExtraStuffAggregator
- extends Object
- implements Serializable
An ExtraStuffAggregator object is used by a bean to add extra properties
and methods specific to that bean instance. Other beans can access the
extra members dynamically by retrieving the Method and PropertyDescriptor
objects for those members. An ExtraStuffAggregator object can also compile
the extra members into a new bean, to let other beans access the extra
members directly.
-
ExtraStuffAggregator()
- Creates an ExtraStuffAggregator object.
-
addExtraMethod(Object, Method, String)
- Creates and adds an extra method record.
-
addExtraProperty(Object, PropertyDescriptor, String)
- Creates and adds an extra property record.
-
compileExtraStuff(String, String)
- Emits and compiles a new bean that contains members corresponding
to each extra member stored in this aggregator.
-
getCompiledExtraStuff()
- Gets a compiled bean that contains members corresponding to each
extra member stored in this ExtraStuffAggregator object.
-
getExtraMethodInfo()
- Gets an array of ExtraMethodRecord objects for all of the extra
methods in this aggregator.
-
getExtraMethodInfo(Object)
- Gets an array of ExtraMethodRecord objects for extra methods with a
given owner object.
-
getExtraMethodInfo(String)
- Gets an array of ExtraMethodRecord objects for the extra methods with
a given name.
-
getExtraPropertyInfo()
- Gets an array of ExtraPropertyRecord objects for all of the extra
properties in this aggregator.
-
getExtraPropertyInfo(Object)
- Gets an array of ExtraPropertyRecord objects for extra properties
with a given owner object.
-
getExtraPropertyInfo(String)
- Gets an array of ExtraPropertyRecord objects for the extra properties
with a given name.
-
removeExtraMethod(Method)
- Removes the extra methods matching a Method descriptor.
-
removeExtraMethod(Object)
- Removes the extra methods owned by a given object.
-
removeExtraMethod(String)
- Removes the extra methods with a given extra name.
-
removeExtraProperty(Object)
- Removes the extra properties belonging to a given owner object.
-
removeExtraProperty(PropertyDescriptor)
- Removes the extra properties matching a PropertyDescriptor object.
-
removeExtraProperty(String)
- Removes the extra properties with a given extra name.
ExtraStuffAggregator
public ExtraStuffAggregator()
- Creates an ExtraStuffAggregator object.
addExtraProperty
public void addExtraProperty(Object propertyOwner,
PropertyDescriptor extraProperty,
String extraPropertyName) throws ExtraStuffAlreadyCompiledException
- Creates and adds an extra property record. This method uses an owner
object reference, a PropertyDescriptor object, and a new name for the
extra property. It allows the same extra property to be added multiple
times.
- Parameters:
- propertyOwner -
- The object that owns the original
property.
- extraProperty -
- The PropertyDescriptor object
for the original property, obtained
by using introspection tools on the
property owner.
- extraPropertyName -
- The name used to present this
extra property.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if the compileExtraStuff method was already called. Extra
properties cannot be added to this aggregator after it compiles
extra members into a new bean.
removeExtraProperty
public void removeExtraProperty(PropertyDescriptor extraProperty) throws ExtraStuffAlreadyCompiledException
- Removes the extra properties matching a PropertyDescriptor object.
It does nothing if the PropertyDescriptor object was not used to
add extra properties to this aggregator.
- Parameters:
- extraProperty -
- A PropertyDescriptor object used
to create extra properties.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if the compileExtraStuff method was already called.
Extra properties cannot be removed from this aggregator after
it compiles extra members into a new bean.
removeExtraProperty
public void removeExtraProperty(Object propertyOwner) throws ExtraStuffAlreadyCompiledException
- Removes the extra properties belonging to a given owner object. It
does nothing if the object does not own any extra properties in this
aggregator.
- Parameters:
- propertyOwner -
- An object that owns properties
presented as extra properties in
this aggregator.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if the compileExtraStuff method was already called.
Extra properties cannot be removed from this aggregator after
it compiles extra members into a new bean.
removeExtraProperty
public void removeExtraProperty(String extraPropertyName) throws ExtraStuffAlreadyCompiledException
- Removes the extra properties with a given extra name. It does nothing
if the name is not found.
- Parameters:
- extraPropertyName -
- A name used to present one
or more extra properties.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if the compileExtraStuff method was already called.
Extra properties cannot be removed from this aggregator after
it compiles extra members into a new bean.
getExtraPropertyInfo
public ExtraPropertyRecord[] getExtraPropertyInfo(String extraPropertyName)
- Gets an array of ExtraPropertyRecord objects for the extra properties
with a given name. The array has a zero length if the name is not found.
- Parameters:
- extraPropertyName -
- A name used to present one or
more extra properties.
getExtraPropertyInfo
public ExtraPropertyRecord[] getExtraPropertyInfo(Object propertyOwner)
- Gets an array of ExtraPropertyRecord objects for extra properties
with a given owner object. The array has a zero length if the object
does not own any extra properties in this aggregator.
- Parameters:
- propertyOwner -
- An object that owns properties
presented as extra properties in
this aggregator.
getExtraPropertyInfo
public ExtraPropertyRecord[] getExtraPropertyInfo()
- Gets an array of ExtraPropertyRecord objects for all of the extra
properties in this aggregator. The array has a zero length if the
aggregator does not contain any extra properties.
addExtraMethod
public void addExtraMethod(Object methodOwner,
Method extraMethod,
String extraMethodName) throws ExtraStuffAlreadyCompiledException
- Creates and adds an extra method record. This method uses an owner
object reference, a Method descriptor, and a new name for the extra
method. It allows the same extra method to be added multiple times.
- Parameters:
- methodOwner -
- The object that owns the original
method.
- extraMethod -
- The Method descriptor for the
original method, obtained by using
introspection tools on the method
owner.
- extraMethodName -
- The name used to present this
extra method.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if the compileExtraStuff method was already called.
Extra methods cannot be added to this aggregator after it
compiles extra members into a new bean.
removeExtraMethod
public void removeExtraMethod(Method extraMethod) throws ExtraStuffAlreadyCompiledException
- Removes the extra methods matching a Method descriptor. It does nothing
if the Method descriptor was not used to add extra methods to this
aggregator.
- Parameters:
- extraMethod -
- A Method descriptor used to create
extra methods.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if the compileExtraStuff method was already called.
Extra methods cannot be removed from this aggregator after
it compiles extra members into a new bean.
removeExtraMethod
public void removeExtraMethod(Object methodOwner) throws ExtraStuffAlreadyCompiledException
- Removes the extra methods owned by a given object. It does nothing
if the object does not own any methods in this aggregator.
- Parameters:
- methodOwner -
- An object that owns methods
presented as extra methods in
this aggregator.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if the compileExtraStuff method was already called.
Extra methods cannot be removed from this aggregator after
it compiles extra members into a new bean.
removeExtraMethod
public void removeExtraMethod(String extraMethodName) throws ExtraStuffAlreadyCompiledException
- Removes the extra methods with a given extra name. It does nothing
if the name is not found.
- Parameters:
- extraMethodName -
- A name used to present one or more
extra methods.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if the compileExtraStuff method was already called.
Extra methods cannot be removed from this aggregator after
it compiles extra members into a new bean.
getExtraMethodInfo
public ExtraMethodRecord[] getExtraMethodInfo(String extraMethodName)
- Gets an array of ExtraMethodRecord objects for the extra methods with
a given name. The array has a zero length if the name is not found.
- Parameters:
- extraMethodName -
- A name used to present one or more
extra methods.
getExtraMethodInfo
public ExtraMethodRecord[] getExtraMethodInfo(Object methodOwner)
- Gets an array of ExtraMethodRecord objects for extra methods with a
given owner object. The array has a zero length if the object does
not own any extra methods in this aggregator.
- Parameters:
- methodOwner -
- An object that owns methods
presented as extra methods in this
aggregator.
getExtraMethodInfo
public ExtraMethodRecord[] getExtraMethodInfo()
- Gets an array of ExtraMethodRecord objects for all of the extra
methods in this aggregator. The array has a zero length if the
aggregator does not contain any extra methods.
getCompiledExtraStuff
public CompiledExtraStuffBean getCompiledExtraStuff()
- Gets a compiled bean that contains members corresponding to each
extra member stored in this ExtraStuffAggregator object. If the
compileExtraStuff method has not yet been called, this method
returns null.
compileExtraStuff
public void compileExtraStuff(String packageName,
String emittedClassName) throws ExtraStuffAlreadyCompiledException, ExtraStuffCompileFailedException
- Emits and compiles a new bean that contains members corresponding
to each extra member stored in this aggregator.
- Parameters:
- packageName -
- The desired package name
for the new bean.
- emittedClassName -
- The desired class name
for the new bean.
- Throws: ExtraStuffAlreadyCompiledException
- Thrown if this method was already called.
- Throws: ExtraStuffCompileFailedException
- Thrown if a fatal error occurs while attempting to compile
the new bean.
All Packages Class Hierarchy This Package Previous Next Index