As far as I can tell, this facility exists for when you use the %Projection.Java class to create a Java class from Cache. At any rate, if you do use a Java projection then the method does actually get projected to the Java class that is created.
Class SomePackage.JavaTest Extends %Persistent
{
Method JavaTestyTest() As %String [ Language = java, WebMethod ]
{
string tmp = "Hello World";
return tmp;
}
Method bleh() as %Library.String
{
q "bleh"
}
Projection NewProjection1 As %Projection.Java(ROOTDIR = "C:\trans");
}
generates too much Java to show all of it, but it includes
public java.lang.String JavaTestyTest () {
string tmp = "Hello World";
return tmp;
}
and
public java.lang.String bleh () throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0];
com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("bleh",args,com.intersys.objects.Database.RET_PRIM);
return res.getString();
}