当前位置: 首页>>代码示例>>Java>>正文


Java SearchControls.OBJECT_SCOPE属性代码示例

本文整理汇总了Java中javax.naming.directory.SearchControls.OBJECT_SCOPE属性的典型用法代码示例。如果您正苦于以下问题:Java SearchControls.OBJECT_SCOPE属性的具体用法?Java SearchControls.OBJECT_SCOPE怎么用?Java SearchControls.OBJECT_SCOPE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.naming.directory.SearchControls的用法示例。


在下文中一共展示了SearchControls.OBJECT_SCOPE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ContextEnumerator

protected ContextEnumerator(Context context, int scope, String contextName,
                         boolean returnSelf)
    throws NamingException {
    if(context == null) {
        throw new IllegalArgumentException("null context passed");
    }

    root = context;

    // No need to list children if we're only searching object
    if (scope != SearchControls.OBJECT_SCOPE) {
        children = getImmediateChildren(context);
    }
    this.scope = scope;
    this.contextName = contextName;
    // pretend root is processed, if we're not supposed to return ourself
    rootProcessed = !returnSelf;
    prepNextChild();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:ContextEnumerator.java

示例2: next

public Binding next() throws NamingException {
    if (!rootProcessed) {
        rootProcessed = true;
        return new Binding("", root.getClass().getName(),
                           root, true);
    }

    if (scope != SearchControls.OBJECT_SCOPE && hasMoreDescendants()) {
        return getNextDescendant();
    }

    throw new NoSuchElementException();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:ContextEnumerator.java

示例3: hasMore

public boolean hasMore() throws NamingException {
    return !rootProcessed ||
        (scope != SearchControls.OBJECT_SCOPE && hasMoreDescendants());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:ContextEnumerator.java


注:本文中的javax.naming.directory.SearchControls.OBJECT_SCOPE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。