 <p>Cast the <code>obj</code> to type of the return. </p> <p>For example if your expected return type is <code>PdsLongAttrImpl</code></p> <p>Then, it would be:</p> <pre><code>PdsLongAttrImpl pdsObj = (PdsLongAttrImpl)obj; </code></pre> <p>//Then perform operation on <code>pdsObj</code>.</p> <p>NOTE: If obj is not of the type you are casting to, you will end up with <code>ClassCastException</code>.</p>