當前位置: 首頁>>代碼示例>>Java>>正文


Java Name.clone方法代碼示例

本文整理匯總了Java中javax.naming.Name.clone方法的典型用法代碼示例。如果您正苦於以下問題:Java Name.clone方法的具體用法?Java Name.clone怎麽用?Java Name.clone使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.naming.Name的用法示例。


在下文中一共展示了Name.clone方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: appendRemainingName

import javax.naming.Name; //導入方法依賴的package包/類
/**
      * Adds components to the end of remaining name.
      *
      * @param name The components to add. Can be null.
      * @see #getRemainingName
      * @see #setRemainingName
      * @see #appendRemainingComponent
      */
    public void appendRemainingName(Name name) {
//      System.out.println("appendingRemainingName: " + name.toString());
//      Exception e = new Exception();
//      e.printStackTrace();
        if (name != null) {
            if (this.remainingName != null) {
                try {
                    this.remainingName.addAll(name);
                } catch (InvalidNameException e) {
                    // ignore; shouldn't happen for composite name
                }
            } else {
                this.remainingName = (Name)(name.clone());
            }
        }
    }
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:25,代碼來源:ResolveResult.java

示例2: composeName

import javax.naming.Name; //導入方法依賴的package包/類
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix)
 * of this context relative to one of its ancestors, this method returns
 * the composition of the two names using the syntax appropriate for the
 * naming system(s) involved. That is, if name names an object relative
 * to this context, the result is the name of the same object, but
 * relative to the ancestor context. None of the names may be null.
 *
 * @param name a name relative to this context
 * @param prefix the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix)
    throws NamingException {
    Name prefixClone = (Name) prefix.clone();
    return prefixClone.addAll(name);
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:22,代碼來源:SelectorContext.java

示例3: composeName

import javax.naming.Name; //導入方法依賴的package包/類
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) 
 * of this context relative to one of its ancestors, this method returns 
 * the composition of the two names using the syntax appropriate for the 
 * naming system(s) involved. That is, if name names an object relative 
 * to this context, the result is the name of the same object, but 
 * relative to the ancestor context. None of the names may be null.
 * 
 * @param name a name relative to this context
 * @param prefix the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix)
    throws NamingException {
    Name clone = (Name) prefix.clone();
    return clone.addAll(name);
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:22,代碼來源:BaseDirContext.java

示例4: composeName

import javax.naming.Name; //導入方法依賴的package包/類
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) 
 * of this context relative to one of its ancestors, this method returns 
 * the composition of the two names using the syntax appropriate for the 
 * naming system(s) involved. That is, if name names an object relative 
 * to this context, the result is the name of the same object, but 
 * relative to the ancestor context. None of the names may be null.
 * 
 * @param name a name relative to this context
 * @param prefix the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix)
    throws NamingException {
    Name prefixClone = (Name) prefix.clone();
    return prefixClone.addAll(name);
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:22,代碼來源:ProxyDirContext.java

示例5: setRemainingName

import javax.naming.Name; //導入方法依賴的package包/類
/**
  * Sets the remaining name field of this result to name.
  * A copy of name is made so that modifying the copy within
  * this ResolveResult does not affect <code>name</code> and
  * vice versa.
  *
  * @param name The name to set remaining name to. Cannot be null.
  * @see #getRemainingName
  * @see #appendRemainingName
  * @see #appendRemainingComponent
  */
public void setRemainingName(Name name) {
    if (name != null)
        this.remainingName = (Name)(name.clone());
    else {
        // ??? should throw illegal argument exception
        this.remainingName = null;
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:20,代碼來源:ResolveResult.java

示例6: composeName

import javax.naming.Name; //導入方法依賴的package包/類
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) of
 * this context relative to one of its ancestors, this method returns the
 * composition of the two names using the syntax appropriate for the naming
 * system(s) involved. That is, if name names an object relative to this
 * context, the result is the name of the same object, but relative to the
 * ancestor context. None of the names may be null.
 *
 * @param name
 *            a name relative to this context
 * @param prefix
 *            the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException
 *                if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
	Name prefixClone = (Name) prefix.clone();
	return prefixClone.addAll(name);
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:24,代碼來源:SelectorContext.java

示例7: composeName

import javax.naming.Name; //導入方法依賴的package包/類
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) of
 * this context relative to one of its ancestors, this method returns the
 * composition of the two names using the syntax appropriate for the naming
 * system(s) involved. That is, if name names an object relative to this
 * context, the result is the name of the same object, but relative to the
 * ancestor context. None of the names may be null.
 * 
 * @param name
 *            a name relative to this context
 * @param prefix
 *            the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException
 *                if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
	Name clone = (Name) prefix.clone();
	return clone.addAll(name);
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:24,代碼來源:BaseDirContext.java

示例8: composeName

import javax.naming.Name; //導入方法依賴的package包/類
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) of
 * this context relative to one of its ancestors, this method returns the
 * composition of the two names using the syntax appropriate for the naming
 * system(s) involved. That is, if name names an object relative to this
 * context, the result is the name of the same object, but relative to the
 * ancestor context. None of the names may be null.
 * 
 * @param name
 *            a name relative to this context
 * @param prefix
 *            the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException
 *                if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
	Name prefixClone = (Name) prefix.clone();
	return prefixClone.addAll(name);
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:24,代碼來源:ProxyDirContext.java


注:本文中的javax.naming.Name.clone方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。