本文整理汇总了Java中com.fujitsu.vdmj.typechecker.Environment.findStateDefinition方法的典型用法代码示例。如果您正苦于以下问题:Java Environment.findStateDefinition方法的具体用法?Java Environment.findStateDefinition怎么用?Java Environment.findStateDefinition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.fujitsu.vdmj.typechecker.Environment
的用法示例。
在下文中一共展示了Environment.findStateDefinition方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: implicitDefinitions
import com.fujitsu.vdmj.typechecker.Environment; //导入方法依赖的package包/类
@Override
public void implicitDefinitions(Environment base)
{
state = base.findStateDefinition();
if (precondition != null)
{
predef = getPreDefinition(base);
predef.markUsed();
}
if (postcondition != null)
{
postdef = getPostDefinition(base);
postdef.markUsed();
}
}
示例2: typeCheck
import com.fujitsu.vdmj.typechecker.Environment; //导入方法依赖的package包/类
@Override
public void typeCheck(Environment base, NameScope scope)
{
if (base.findStateDefinition() != this)
{
report(3047, "Only one state definition allowed per module");
return;
}
for (TCField field: recordType.fields)
{
TypeComparator.checkComposeTypes(field.type, base, false);
}
statedefs.typeCheck(base, scope);
if (invdef != null)
{
invdef.typeCheck(base, scope);
}
if (initdef != null)
{
initdef.typeCheck(base, scope);
}
}
示例3: typeCheck
import com.fujitsu.vdmj.typechecker.Environment; //导入方法依赖的package包/类
@Override
public TCType typeCheck(Environment env, NameScope scope, TCType constraint)
{
targetType = target.typeCheck(env);
expType = exp.typeCheck(env, null, scope, targetType);
if (!TypeComparator.compatible(targetType, expType))
{
report(3239, "Incompatible types in assignment");
detail2("Target", targetType, "Expression", expType);
}
classDefinition = env.findClassDefinition();
stateDefinition = env.findStateDefinition();
inConstructor = inConstructor(env);
if (inConstructor)
{
// Mark assignment target as initialized (so no warnings)
TCDefinition state = target.targetDefinition(env);
if (state instanceof TCInstanceVariableDefinition)
{
TCInstanceVariableDefinition iv = (TCInstanceVariableDefinition)state;
iv.initialized = true;
}
}
return new TCVoidType(location);
}