org.eclipse.ocl.examples.codegen.oclinjunit
Class JUnitCodeGenerator

java.lang.Object
  extended by org.eclipse.ocl.examples.codegen.generator.AbstractCodeGenerator
      extended by org.eclipse.ocl.examples.codegen.java.JavaCodeGenerator
          extended by org.eclipse.ocl.examples.codegen.oclinjunit.JUnitCodeGenerator
All Implemented Interfaces:
CodeGenerator

public class JUnitCodeGenerator
extends JavaCodeGenerator

OCL2JavaClass supports generation of the content of a JavaClassFile with a ststic INSTANCE to provide the polymorphic implementation of an ExpressionInOCL.


Field Summary
protected  CodeGenAnalyzer cgAnalyzer
           
protected  ExpressionInOCL expInOcl
           
 
Fields inherited from class org.eclipse.ocl.examples.codegen.java.JavaCodeGenerator
javaPrimitiveClasses, javaPrimitiveNames, knownClasses
 
Fields inherited from class org.eclipse.ocl.examples.codegen.generator.AbstractCodeGenerator
genModelHelper, metaModelManager, nameManager, ORG_ECLIPSE_JDT_ANNOTATION_NON_NULL, ORG_ECLIPSE_JDT_ANNOTATION_NULLABLE
 
Constructor Summary
JUnitCodeGenerator(MetaModelManager metaModelManager, ExpressionInOCL expInOcl, boolean useNullAnnotations)
           
 
Method Summary
protected  JUnitGlobalContext createGlobalContext()
           
 java.lang.String generateClassFile(java.lang.String packageName, java.lang.String className)
           
 CodeGenAnalyzer getAnalyzer()
           
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.JavaCodeGenerator
createBoxingAnalyzer, createCG2JavaPreVisitor, createDependencyVisitor, createDependencyVisitor, createFieldingAnalyzer, createGenModelHelper, createId2BoxedJavaClassVisitor, createId2EClassVisitor, createId2UnboxedJavaClassVisitor, createNameManager, getConstantsClass, getEClass, getGlobalContext, getId2BoxedClassVisitor, getId2EClassVisitor, getId2UnboxedClassVisitor, getIterationHelper, getTypeDescriptor, getTypeDescriptor, initPrimitive
 
Methods inherited from class org.eclipse.ocl.examples.codegen.generator.AbstractCodeGenerator
addProblem, createAnalysisVisitor, createOptions, getDefaultIndent, getGenModelHelper, getMetaModelManager, getNameManager, getOptions, isFinal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cgAnalyzer

@NonNull
protected final CodeGenAnalyzer cgAnalyzer

expInOcl

@NonNull
protected final ExpressionInOCL expInOcl
Constructor Detail

JUnitCodeGenerator

public JUnitCodeGenerator(@NonNull
                          MetaModelManager metaModelManager,
                          @NonNull
                          ExpressionInOCL expInOcl,
                          boolean useNullAnnotations)
Method Detail

generateClassFile

@NonNull
public java.lang.String generateClassFile(java.lang.String packageName,
                                                  java.lang.String className)

createGlobalContext

@NonNull
protected JUnitGlobalContext createGlobalContext()
Specified by:
createGlobalContext in class JavaCodeGenerator

getAnalyzer

@NonNull
public CodeGenAnalyzer getAnalyzer()