IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.core
Class AbstractPatternResult

java.lang.Object
  extended bycom.ibm.xtools.patterns.core.AbstractPatternResult
Direct Known Subclasses:
PatternsFrameworkResult

public abstract class AbstractPatternResult
extends Object

Provides a mechanism for pattern instance providers to return structured results from their operations.

A pattern result can have zero or more nested pattern results (getNestedResults) and zero or more created objects (getCreatedobjects). To add a nested pattern result, use the addNestedResult method. Use the addCreatedObject method to add an object to the created objects of the pattern result.


Constructor Summary
AbstractPatternResult()
          Creates an empty pattern result.
 
Method Summary
abstract  void addCreatedObject(Object object)
          Adds the given object to the created objects of this pattern result.
abstract  void addCreatedObjects(Object[] objects)
          Adds the given array of objects to the collection of created objects associated with this pattern result.
abstract  void addNestedResult(AbstractPatternResult nestedResult)
          Adds the given result to the nested results of this pattern result.
abstract  Object[] getCreatedObjects()
          Returns the created objects, if any, of this pattern result.
abstract  AbstractPatternResult[] getNestedResults()
          Returns the nested results, if any, of this pattern result.
abstract  boolean hasCreatedObjects()
          Indicates whether this pattern result has any created objects.
abstract  boolean hasNestedResults()
          Indicates whether this pattern result has any nested results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternResult

public AbstractPatternResult()
Creates an empty pattern result.

Method Detail

hasNestedResults

public abstract boolean hasNestedResults()
Indicates whether this pattern result has any nested results.

Returns:
Returns true if the pattern result has nested results; otherwise, it returns false.

getNestedResults

public abstract AbstractPatternResult[] getNestedResults()
Returns the nested results, if any, of this pattern result.

Returns:
Returns the nested results of this pattern result.

addNestedResult

public abstract void addNestedResult(AbstractPatternResult nestedResult)
Adds the given result to the nested results of this pattern result.


hasCreatedObjects

public abstract boolean hasCreatedObjects()
Indicates whether this pattern result has any created objects.

Returns:
Returns true if the pattern result has created objects; otherwies, it returns false.

getCreatedObjects

public abstract Object[] getCreatedObjects()
Returns the created objects, if any, of this pattern result.

Returns:
Returns the created objects of this pattern result.

addCreatedObject

public abstract void addCreatedObject(Object object)
Adds the given object to the created objects of this pattern result.


addCreatedObjects

public abstract void addCreatedObjects(Object[] objects)
Adds the given array of objects to the collection of created objects associated with this pattern result.

Parameters:
objects - The array of objects to be added to the collection of created objects.

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.