org.eclipse.ocl.examples.codegen.java
Class JavaLocalContext
java.lang.Object
org.eclipse.ocl.examples.codegen.java.AbstractJavaContext
org.eclipse.ocl.examples.codegen.java.JavaLocalContext
- All Implemented Interfaces:
- LocalContext
- Direct Known Subclasses:
- JUnitLocalContext, OCLinEcoreLocalContext
public abstract class JavaLocalContext
- extends AbstractJavaContext
- implements LocalContext
A JavaLocalContext maintains the Java-specific context for generation of coide from a CGOperation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
globalContext
@NonNull
protected final JavaGlobalContext globalContext
parentContext
@Nullable
protected final JavaLocalContext parentContext
cgScope
@NonNull
protected CGElement cgScope
nameManagerContext
@NonNull
protected NameManager.Context nameManagerContext
JavaLocalContext
public JavaLocalContext(@NonNull
JavaGlobalContext globalContext,
@NonNull
CGElement cgScope)
JavaLocalContext
public JavaLocalContext(@NonNull
JavaLocalContext parentContext,
@NonNull
CGElement cgScope)
addCastParameter
protected void addCastParameter(@NonNull
CGParameter cgParameter,
@NonNull
CGParameter cgCastParameter)
addDependency
public void addDependency(@NonNull
CGValuedElement cgElement,
@NonNull
CGValuedElement cgDependency)
addLocalVariable
public void addLocalVariable(@NonNull
CGValuedElement cgVariable)
basicGetCastParameter
@Nullable
public CGParameter basicGetCastParameter(@NonNull
CGParameter cgParameter)
createCastParameter
@NonNull
protected CGParameter createCastParameter(@NonNull
CGParameter cgParameter)
- Return a CGCastParameter for cgParameter, unless the cast would be a redundant cast to Object.
createNestedContext
@NonNull
protected abstract JavaLocalContext createNestedContext(@NonNull
CGElement cgScope)
getCastParameter
@NonNull
public CGParameter getCastParameter(@NonNull
CGParameter cgParameter)
getCastParameters
@NonNull
public java.util.Collection<CGParameter> getCastParameters()
getEvaluatorParameter
@NonNull
public CGValuedElement getEvaluatorParameter()
getExecutorProperty
@NonNull
public CGExecutorProperty getExecutorProperty(@NonNull
Property pivotProperty)
getExecutorType
@NonNull
public CGExecutorType getExecutorType(@NonNull
Type pivotType)
- Specified by:
getExecutorType
in interface LocalContext
getExecutorType
@NonNull
public CGExecutorType getExecutorType(@NonNull
TypeId typeId)
getGlobalContext
@NonNull
public JavaGlobalContext getGlobalContext()
getIdResolverVariable
@NonNull
public CGValuedElement getIdResolverVariable()
getLocalVariables
public java.util.Collection<? extends CGValuedElement> getLocalVariables()
getOuterContext
@NonNull
public JavaLocalContext getOuterContext()
getNameManagerContext
@NonNull
public NameManager.Context getNameManagerContext()
- Specified by:
getNameManagerContext
in interface LocalContext
getStandardLibraryVariable
@NonNull
public CGText getStandardLibraryVariable()
getTypeIdParameter
@NonNull
public CGParameter getTypeIdParameter()
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 cgValueElement,
@NonNull
java.lang.String nameHint,
@NonNull
TypeId typeId)