naming/src/main/java/org/jboss/as/naming/NamingContext.java
public Name composeName(Name name, Name prefix) throws NamingException {
        final Name result = (Name) prefix.clone();
        if (name instanceof CompositeName) {
            if (name.size() == 1) {
                // name could be a nested name
                final String firstComponent = name.get(0);
                result.addAll(parseName(firstComponent));
            } else {
                result.addAll(name);
            }
        } else {
            result.addAll(new CompositeName(name.toString()));
        }
        return result;
    }
public Name composeName(Name name, Name prefix) throws NamingException {
        final Name result = (Name) prefix.clone();
        if (name instanceof CompositeName) {
            if (name.size() == 1) {
                // name could be a nested name
                final String firstComponent = name.get(0);
                result.addAll(parseName(firstComponent));
            } else {
                result.addAll(name);
            }
        } else {
            result.addAll(new CompositeName(name.toString()));
        }
        return result;
    }
public Name composeName ( Name name , Name prefix ) throws NamingException { final Name result = ( Name ) prefix . clone ( ) ; if ( name instanceof CompositeName ) { if ( name . size ( ) == 1 ) { // name could be a nested name final String firstComponent = name . get ( 0 ) ; result . addAll ( parseName ( firstComponent ) ) ; } else { result . addAll ( name ) ; } } else { result . addAll ( new CompositeName ( name . toString ( ) ) ) ; } return result ; }
{@inheritDoc}
{