You can use getType on an IMendixObject to find the complete entity name ;-)
You create an input parameter, say ResultEntity of type Entity, and you specify that it should be stored in a type parameter.
Next you define a result list of the type stored in the type parameter.
In your java code you will receive a string which contains the entity name. You can use this as follows to create an object:
IMendixObject obj = Core.instantiate(getContext(),this.ResultEntity);
Here's an example java action, both ResultEntity and Return type entity use the same type parameter.
The type parameter:
You can find an example use case on github in the OracleConnector project. The ExecuteQuery action uses a type parameter.