IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.transform.uml2.cpp
Class CPPExtendFramework

java.lang.Object
  extended bycom.ibm.xtools.transform.core.AbstractTransformElement
      extended bycom.ibm.xtools.transform.core.AbstractRule
          extended bycom.ibm.xtools.transform.uml2.cpp.CPPExtendFramework
All Implemented Interfaces:
ITransformationItem
Direct Known Subclasses:
CPPExtendOperationRule, CPPExtendRule

public abstract class CPPExtendFramework
extends AbstractRule

This class contains common functionality for the UML to C++ transformation extensibility.


Constructor Summary
CPPExtendFramework(String id)
          Constructor.
 
Method Summary
 boolean canAccept(ITransformContext context)
          The implementation of this method filters out contexts with inappropriate source elements, then calls canAcceptExt to provide additional filtering capabilities.
 boolean canAcceptExt(ITransformContext context)
          Override this method to provide additional filtering capabilities.
 Object createTarget(ITransformContext ruleContext)
          The implementation of this method calls createTargetExt.
abstract  void createTargetExt(ITransformContext ruleContext)
          Implement this method to extend C++ transformation.
 
Methods inherited from class com.ibm.xtools.transform.core.AbstractRule
execute, findTarget, isSourceConsumed, mapTarget, toString, updateTarget
 
Methods inherited from class com.ibm.xtools.transform.core.AbstractTransformElement
getAcceptCondition, getDescription, getId, getName, getProgressMonitor, setAcceptCondition, setDescription, setId, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CPPExtendFramework

public CPPExtendFramework(String id)
Constructor.

Parameters:
id - A unique identifier for the rule.
Method Detail

createTargetExt

public abstract void createTargetExt(ITransformContext ruleContext)
Implement this method to extend C++ transformation.

Parameters:
ruleContext - rule execution context

canAccept

public boolean canAccept(ITransformContext context)
The implementation of this method filters out contexts with inappropriate source elements, then calls canAcceptExt to provide additional filtering capabilities.

Overrides:
canAccept in class AbstractTransformElement
Parameters:
context - this rule execution context
Returns:
boolean - true if the transform element will execute with the context

canAcceptExt

public boolean canAcceptExt(ITransformContext context)
Override this method to provide additional filtering capabilities. Default implementation returns true. Return true to indicate that the rule can process this context.

Parameters:
context - The current context of the transformation execution.
Returns:
boolean true if the rule should execute in this context.

createTarget

public final Object createTarget(ITransformContext ruleContext)
The implementation of this method calls createTargetExt. Implement createTargetExt to extend C++ transformation.

Specified by:
createTarget in class AbstractRule
Parameters:
ruleContext - this rule execution context
Returns:
Object - the new target object.

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

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