All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.beans.AggregateObject

java.lang.Object
    |
    +----java.beans.AggregateObject

public abstract class AggregateObject
extends Object
implements Delegate

The AggregageObject class, is an abstract base class used to aid in the creation of "pure" Aggregate classes.

A "pure" aggregate class, is defined as a concrete subclass of this base class that exhibits ALL of its client semantics via the Aggregation mechansiam.

This abstract base class provides a simple "factory" implementation that allows the implementation of a "pure" aggregate to be named, and thus subsequently accessable to Java. In addition, this class also provides default implementation for the Aggregate interface methods.

Since:
JDK1.2

Constructor Index

 o AggregateObject()
Instantiate an Agggregate
 o AggregateObject(Aggregate)
Instantiate a nested Agggregate

Method Index

 o getAggregate()
 o getDelegateInstanceOf(Class)

Requests this Aggregate for an instance of a delegate of the requested type without delegating the request out to any nested Aggregate.

 o getDelegateTypes()

Returns the enumeration of types this Aggregate can delegate without delegating the request out to any nested Aggregate.

 o getInstanceOf(Class)
 o getTypes()
 o instantiate(Class, Aggregate)
Instantiate an Aggregate
 o isInstanceOf(Class)

Constructors

 o AggregateObject
public AggregateObject()
Instantiate an Agggregate

 o AggregateObject
public AggregateObject(Aggregate outer)
Instantiate a nested Agggregate

Parameters:
outer - The enclosing Aggregate object

Methods

 o instantiate
public static Aggregate instantiate(Class c,
                                    Aggregate aggregate) throws InstantiationException
Instantiate an Aggregate

 o getAggregate
protected final Aggregate getAggregate()
Returns:
the nesting Aggregate
 o getInstanceOf
public final Aggregate getInstanceOf(Class delegateInterface)
Parameters:
delegateInterface - The Class object representing the class or interaface for the requested delegation
Returns:
The reference to the requested Delegate instance
Throws: NullPointerException
Throws: ClassCastException
 o isInstanceOf
public final boolean isInstanceOf(Class delegateInterface)
Parameters:
delegateInterface - The Class object representing the class or interaface for the requested delegation
Returns:
true iff the object has currently, or can in the future aggregate, a delegate that implements the specified Class
Throws: NullPointerException
 o getTypes
public final Enumeration getTypes()
Returns:
the list of types this Aggregate may provide via getInstanceOf()
 o getDelegateInstanceOf
public abstract Aggregate getDelegateInstanceOf(Class DelegateClass)

Requests this Aggregate for an instance of a delegate of the requested type without delegating the request out to any nested Aggregate. This method shall only be called by nesting Aggregates, and is not intended to be used by clients of this Aggregate.

Parameters:
delegateInterface - The Class object representing the class or interaface for the requested delegation
Returns:
The reference to the requested Delegate instance or null
 o getDelegateTypes
public abstract Enumeration getDelegateTypes()

Returns the enumeration of types this Aggregate can delegate without delegating the request out to any nested Aggregate. This method shall only be called by nesting Aggregates, and is not intended to be used by clients of this Aggregate.

Returns:
the list of types this Aggregate may provide via getInstanceOf()

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature