org.eclipse.ocl.examples.codegen.java
Class JavaLocalContext

java.lang.Object
  extended by org.eclipse.ocl.examples.codegen.java.AbstractJavaContext
      extended by org.eclipse.ocl.examples.codegen.java.JavaLocalContext
All Implemented Interfaces:
LocalContext
Direct Known Subclasses:
AutoLocalContext, OCLinEcoreLocalContext

public class JavaLocalContext
extends AbstractJavaContext
implements LocalContext

A JavaLocalContext maintains the Java-specific context for generation of coide from a CGOperation.


Field Summary
protected  CGElement cgScope
           
protected  JavaGlobalContext globalContext
           
protected  NameManager.Context nameManagerContext
           
protected  JavaLocalContext parentContext
           
 
Fields inherited from class org.eclipse.ocl.examples.codegen.java.AbstractJavaContext
analyzer, codeGenerator
 
Constructor Summary
JavaLocalContext(JavaGlobalContext globalContext, CGElement cgScope)
           
 
Method Summary
 CGParameter createEvaluatorParameter()
           
 CGValuedElement createEvaluatorVariable()
           
 CGValuedElement createIdResolverVariable()
           
 CGText createStandardLibraryVariable()
           
 CGParameter createTypeIdParameter()
           
 CGValuedElement getEvaluatorParameter(CGValuedElement cgValuedElement)
          Deprecated. 
 JavaGlobalContext getGlobalContext()
           
 CGValuedElement getIdResolverVariable(CGValuedElement cgValuedElement)
           
 NameManager.Context getNameManagerContext()
           
 JavaLocalContext getOuterContext()
           
 CGValuedElement getOwned(CGValuedElement cgValuedElement, java.lang.String name)
           
 CGValuedElement getStandardLibraryVariable(CGValuedElement cgValuedElement)
           
 CGParameter getTypeIdParameter(CGValuedElement cgValuedElement)
          Deprecated. 
 java.lang.String getValueName(CGValuedElement cgElement)
           
 void setNames(CGValuedElement cgValueElement, CGValuedElement cgExpression)
           
protected  void setNames(CGValuedElement cgValuedElement, java.lang.String nameHint, TypeId typeId)
           
protected  void setNames2(CGValuedElement cgValuedElement, java.lang.String nameHint, TypeId typeId)
           
 
Methods inherited from class org.eclipse.ocl.examples.codegen.java.AbstractJavaContext
getAnalyzer, getCodeGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

globalContext

@NonNull
protected final JavaGlobalContext globalContext

parentContext

@Nullable
protected final JavaLocalContext parentContext

cgScope

@NonNull
protected CGElement cgScope

nameManagerContext

@NonNull
protected NameManager.Context nameManagerContext
Constructor Detail

JavaLocalContext

public JavaLocalContext(@NonNull
                        JavaGlobalContext globalContext,
                        @NonNull
                        CGElement cgScope)
Method Detail

createEvaluatorParameter

@Nullable
public CGParameter createEvaluatorParameter()

createEvaluatorVariable

@Nullable
public CGValuedElement createEvaluatorVariable()

createIdResolverVariable

@NonNull
public CGValuedElement createIdResolverVariable()

createStandardLibraryVariable

@NonNull
public CGText createStandardLibraryVariable()

createTypeIdParameter

@Nullable
public CGParameter createTypeIdParameter()

getEvaluatorParameter

@Deprecated
@NonNull
public CGValuedElement getEvaluatorParameter(@NonNull
                                                                CGValuedElement cgValuedElement)
Deprecated. 


getGlobalContext

@NonNull
public JavaGlobalContext getGlobalContext()

getIdResolverVariable

@NonNull
public CGValuedElement getIdResolverVariable(@NonNull
                                                     CGValuedElement cgValuedElement)

getNameManagerContext

@NonNull
public NameManager.Context getNameManagerContext()
Specified by:
getNameManagerContext in interface LocalContext

getOuterContext

@NonNull
public JavaLocalContext getOuterContext()

getOwned

@NonNull
public CGValuedElement getOwned(@NonNull
                                        CGValuedElement cgValuedElement,
                                        @NonNull
                                        java.lang.String name)

getStandardLibraryVariable

@NonNull
public CGValuedElement getStandardLibraryVariable(@NonNull
                                                          CGValuedElement cgValuedElement)

getTypeIdParameter

@Deprecated
@NonNull
public CGParameter getTypeIdParameter(@NonNull
                                                         CGValuedElement cgValuedElement)
Deprecated. 


getValueName

@NonNull
public java.lang.String getValueName(@NonNull
                                             CGValuedElement cgElement)

setNames

public void setNames(@NonNull
                     CGValuedElement cgValueElement,
                     @NonNull
                     CGValuedElement cgExpression)
Specified by:
setNames in interface LocalContext

setNames

protected void setNames(@NonNull
                        CGValuedElement cgValuedElement,
                        @NonNull
                        java.lang.String nameHint,
                        @NonNull
                        TypeId typeId)

setNames2

protected void setNames2(@NonNull
                         CGValuedElement cgValuedElement,
                         @NonNull
                         java.lang.String nameHint,
                         @NonNull
                         TypeId typeId)