本文整理汇总了Java中net.ssehub.easy.varModel.cst.Variable.getQualifier方法的典型用法代码示例。如果您正苦于以下问题:Java Variable.getQualifier方法的具体用法?Java Variable.getQualifier怎么用?Java Variable.getQualifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.ssehub.easy.varModel.cst.Variable
的用法示例。
在下文中一共展示了Variable.getQualifier方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitVariable
import net.ssehub.easy.varModel.cst.Variable; //导入方法依赖的package包/类
@Override
public void visitVariable(Variable variable) {
ConstraintSyntaxTree qualifier = variable.getQualifier();
if (null != qualifier) {
// special case: attributes -> find attribute decision variable
IDecisionVariable attribute = null;
qualifier.accept(this);
if (null != result) {
IDecisionVariable var = result.getVariable();
if (null != var) {
boolean byName = isFreezeVariable(qualifier);
attribute = findAttribute(var, variable.getVariable(), byName);
if (null == attribute && !byName) { // give rise to direct match, but try for project/nested attribs
attribute = findAttribute(var, variable.getVariable(), true);
}
} // the project does only define the name rather than the attributes
}
clearResult();
// shall not be null if model is valid
result = VariableAccessor.POOL.getInstance().bind(attribute, context);
} else {
result = VariableAccessor.POOL.getInstance().bind(variable.getVariable(), context);
}
}
示例2: visitVariable
import net.ssehub.easy.varModel.cst.Variable; //导入方法依赖的package包/类
@Override
public void visitVariable(Variable variable) {
AbstractVariable var = variable.getVariable();
if (!defined.contains(var) && null == variable.getQualifier()) {
// unqualified compound slot use in constraint in compound
if (var instanceof DecisionVariableDeclaration) {
IModelElement par = var.getParent();
while (null != par && par instanceof AttributeAssignment) {
par = par.getParent();
}
if (par instanceof Compound) {
result.add((DecisionVariableDeclaration) var);
}
}
}
}
示例3: visitVariable
import net.ssehub.easy.varModel.cst.Variable; //导入方法依赖的package包/类
@Override
public void visitVariable(Variable variable) {
AbstractVariable var = variable.getVariable();
boolean needsFqn = false;
if (null != variable.getQualifier()) {
variable.getQualifier().accept(this);
appendOutput(".");
} else {
needsFqn = needsQualification(variable.getVariable());
}
if (needsFqn) {
appendOutput(var.getQualifiedName());
} else {
appendOutput(var.getName());
}
}