本文整理匯總了Java中com.fujitsu.vdmj.typechecker.Environment.isStatic方法的典型用法代碼示例。如果您正苦於以下問題:Java Environment.isStatic方法的具體用法?Java Environment.isStatic怎麽用?Java Environment.isStatic使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.fujitsu.vdmj.typechecker.Environment
的用法示例。
在下文中一共展示了Environment.isStatic方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: typeCheck
import com.fujitsu.vdmj.typechecker.Environment; //導入方法依賴的package包/類
@Override
public TCType typeCheck(Environment env, TCTypeList qualifiers, NameScope scope, TCType constraint)
{
TCClassDefinition classdef = env.findClassDefinition();
for (TCNameToken opname: opnames)
{
int found = 0;
for (TCDefinition def: classdef.getDefinitions())
{
if (def.name != null && def.name.matches(opname))
{
found++;
if (!def.isCallableOperation())
{
opname.report(3105, opname + " is not an explicit operation");
}
if (def.isPure())
{
opname.report(3342, "Cannot use history counters for pure operations");
}
if (!def.isStatic() && env.isStatic())
{
opname.report(3349, "Cannot see non-static operation from static context");
}
}
}
if (found == 0)
{
opname.report(3106, opname + " is not in scope");
}
else if (found > 1)
{
opname.warning(5004, "History expression of overloaded operation");
}
if (opname.getName().equals(classdef.name.getName()))
{
opname.report(3107, "Cannot use history of a constructor");
}
}
return new TCNaturalType(location);
}