JBIDE-17548 - Creation of JAX-RS Resource generate code with syntax error

Fixed the problem that occurred when no Target Entity was given.
Also, prevents the creation of the method stubs if no Target Entity is given, to avoid
compilation errors.