本文整理汇总了Java中org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement.getDeclared方法的典型用法代码示例。如果您正苦于以下问题:Java EffectiveStatement.getDeclared方法的具体用法?Java EffectiveStatement.getDeclared怎么用?Java EffectiveStatement.getDeclared使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement
的用法示例。
在下文中一共展示了EffectiveStatement.getDeclared方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createEffective
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement; //导入方法依赖的package包/类
@Override
public EffectiveStatement<Boolean, MandatoryStatement> createEffective(
final StmtContext<Boolean, MandatoryStatement, EffectiveStatement<Boolean, MandatoryStatement>> ctx) {
final EffectiveStatement<Boolean, MandatoryStatement> ret = new MandatoryEffectiveStatementImpl(ctx);
final MandatoryStatement declared = ret.getDeclared();
if (declared instanceof EmptyMandatoryStatement && ret.effectiveSubstatements().isEmpty()) {
return ((EmptyMandatoryStatement)declared).toEffective();
}
return ret;
}
示例2: createEffective
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement; //导入方法依赖的package包/类
@Override
public EffectiveStatement<Boolean, ConfigStatement> createEffective(
final StmtContext<Boolean, ConfigStatement, EffectiveStatement<Boolean, ConfigStatement>> ctx) {
final EffectiveStatement<Boolean, ConfigStatement> ret = new ConfigEffectiveStatementImpl(ctx);
final ConfigStatement declared = ret.getDeclared();
if (declared instanceof EmptyConfigStatement && ret.effectiveSubstatements().isEmpty()) {
return ((EmptyConfigStatement)declared).toEffective();
}
return ret;
}
示例3: create
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement; //导入方法依赖的package包/类
static EffectiveSchemaContext create(final List<DeclaredStatement<?>> rootDeclaredStatements,
final List<EffectiveStatement<?, ?>> rootEffectiveStatements) {
final Set<Module> modules = new HashSet<>();
for (EffectiveStatement<?, ?> stmt : rootEffectiveStatements) {
if (stmt.getDeclared() instanceof ModuleStatement) {
Verify.verify(stmt instanceof Module);
modules.add((Module) stmt);
}
}
return new EffectiveSchemaContext(modules, rootDeclaredStatements, rootEffectiveStatements);
}