org.eclipse.ocl.examples.codegen.java.iteration
Class IsUniqueIteration2Java

java.lang.Object
  extended by org.eclipse.ocl.examples.codegen.java.iteration.AbstractIteration2Java
      extended by org.eclipse.ocl.examples.codegen.java.iteration.AbstractAccumulation2Java
          extended by org.eclipse.ocl.examples.codegen.java.iteration.IsUniqueIteration2Java
All Implemented Interfaces:
IterationHelper, Iteration2Java

public class IsUniqueIteration2Java
extends AbstractAccumulation2Java


Field Summary
static IsUniqueIteration2Java INSTANCE
           
 
Constructor Summary
IsUniqueIteration2Java()
           
 
Method Summary
 void appendAccumulatorInit(JavaStream js, CGBuiltInIterationCallExp cgIterationCallExp)
           
 boolean appendFinalValue(JavaStream js, CGBuiltInIterationCallExp cgIterationCallExp)
          Append the code to assign the final value to the result.
 void appendUpdate(JavaStream js, CGBuiltInIterationCallExp cgIterationCallExp)
           
 CGTypeId getAccumulatorTypeId(CodeGenAnalyzer analyzer, CGBuiltInIterationCallExp cgIterationCallExp)
           
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.iteration.AbstractAccumulation2Java
getAccumulator, getAccumulatorClass
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.iteration.AbstractIteration2Java
getBody, getIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

@NonNull
public static final IsUniqueIteration2Java INSTANCE
Constructor Detail

IsUniqueIteration2Java

public IsUniqueIteration2Java()
Method Detail

appendAccumulatorInit

public void appendAccumulatorInit(@NonNull
                                  JavaStream js,
                                  @NonNull
                                  CGBuiltInIterationCallExp cgIterationCallExp)
Specified by:
appendAccumulatorInit in interface Iteration2Java
Overrides:
appendAccumulatorInit in class AbstractAccumulation2Java

appendFinalValue

public boolean appendFinalValue(@NonNull
                                JavaStream js,
                                @NonNull
                                CGBuiltInIterationCallExp cgIterationCallExp)
Description copied from interface: Iteration2Java
Append the code to assign the final value to the result.

Returns true if control flow continues into a break, false if terminated by a throw.

Specified by:
appendFinalValue in interface Iteration2Java
Overrides:
appendFinalValue in class AbstractAccumulation2Java

appendUpdate

public void appendUpdate(@NonNull
                         JavaStream js,
                         @NonNull
                         CGBuiltInIterationCallExp cgIterationCallExp)

getAccumulatorTypeId

@Nullable
public CGTypeId getAccumulatorTypeId(@NonNull
                                              CodeGenAnalyzer analyzer,
                                              @NonNull
                                              CGBuiltInIterationCallExp cgIterationCallExp)
Specified by:
getAccumulatorTypeId in interface IterationHelper
Overrides:
getAccumulatorTypeId in class AbstractAccumulation2Java