org.eclipse.ocl.expressions.operations
Class LoopExpOperations

java.lang.Object
  extended by org.eclipse.ocl.expressions.operations.OCLExpressionOperations
      extended by org.eclipse.ocl.expressions.operations.LoopExpOperations
Direct Known Subclasses:
IterateExpOperations, IteratorExpOperations

public class LoopExpOperations
extends OCLExpressionOperations

A static utility class that provides operations related to 'Loop Exp' model objects.

The following operations are supported:


Constructor Summary
protected LoopExpOperations()
           
 
Method Summary
static
<C,PM> boolean
checkLoopVariableInit(LoopExp<C,PM> loopExp, DiagnosticChain diagnostics, Map<Object,Object> context)
          self.iterator->forAll(initExpression->isEmpty())
static
<C,PM> boolean
checkLoopVariableType(LoopExp<C,PM> loopExp, DiagnosticChain diagnostics, Map<Object,Object> context)
          self.iterator->forAll(type = source.type.oclAsType(CollectionType).elementType)
static
<C,PM> boolean
checkSourceCollection(LoopExp<C,PM> loopExp, DiagnosticChain diagnostics, Map<Object,Object> context)
          source.type.oclIsKindOf(CollectionType)
 
Methods inherited from class org.eclipse.ocl.expressions.operations.OCLExpressionOperations
accept, getName, getType, setName, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopExpOperations

protected LoopExpOperations()

Method Detail

checkSourceCollection

public static <C,PM> boolean checkSourceCollection(LoopExp<C,PM> loopExp,
                                                   DiagnosticChain diagnostics,
                                                   Map<Object,Object> context)
source.type.oclIsKindOf(CollectionType)

Parameters:
loopExp - The receiving 'Loop Exp' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

checkLoopVariableInit

public static <C,PM> boolean checkLoopVariableInit(LoopExp<C,PM> loopExp,
                                                   DiagnosticChain diagnostics,
                                                   Map<Object,Object> context)
self.iterator->forAll(initExpression->isEmpty())

Parameters:
loopExp - The receiving 'Loop Exp' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

checkLoopVariableType

public static <C,PM> boolean checkLoopVariableType(LoopExp<C,PM> loopExp,
                                                   DiagnosticChain diagnostics,
                                                   Map<Object,Object> context)
self.iterator->forAll(type = source.type.oclAsType(CollectionType).elementType)

Parameters:
loopExp - The receiving 'Loop Exp' model object.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.