The displayCustom function in http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki//objects/classes/PropertyClass.java
sets the velocity variables $name $prefix $object
In syntax 1.0/XWiki 1.8.4 you could access these in your custom displayer code.
In syntax 2.0 it seems you cannot access them directly.
In xwiki 2.1.1 you can use $context.vcontext.name
In xwiki.2.2 even that call does not work
However if previous velocity has set these variables then it works. It seems the particular velocity context used in displayCustom is ignored.