本文整理匯總了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());
}
}