public Example addChild()
    {
        if (hasChild())
        {
            return child.addSibling();
        }
        else
        {
            if (childTags.isEmpty()) throw new IllegalStateException( "No child tag" );
            List<String> moreTags = new ArrayList<String>( childTags );
            String childTag = firstPattern( CollectionUtil.shift( moreTags ) );
            child = createSpecification( childTag, moreTags );
            return child;
        }
    }
public Example addChild ( ) { if ( hasChild ( ) ) { return child . addSibling ( ) ; } else { if ( childTags . isEmpty ( ) ) throw new IllegalStateException ( "No child tag" ) ; List < String > moreTags = new ArrayList < String > ( childTags ) ; String childTag = firstPattern ( CollectionUtil . shift ( moreTags ) ) ; child = createSpecification ( childTag , moreTags ) ; return child ; } }
<p>addChild.</p>

@return a {@link com.greenpepper.Example} object.